Script to Mount/Eject .VHDX file from Google drive?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Dacicusan
Posts: 4
Joined: 19 Jan 2018, 03:17

Script to Mount/Eject .VHDX file from Google drive?

23 May 2024, 09:58

Hi all. I do have a peculiar issue. I am trying to create a script that can (using a shortcut key) Mount and Eject a .VHDX drive that I do have stored on my local HDD into the Google drive partition.

For now I do need to open a PowerShell instance in Terminal as Admin and to type:

Code: Select all

PS C:\> Mount-DiskImage -ImagePath "G:\My Drive\test.vhdx"
to mount my drive, and after that to close the PowerShell window. If I want to unmount/eject the same drive I do need to open again the PowerShell and type:

Code: Select all

PS C:\> Dismount-DiskImage -ImagePath "G:\My Drive\test.vhdx"
It is there a way to create an AutoHotkey script that can do this by pressing a combination of keys on the keyboard? Lets say if the drive it is not mounted, pressing "Ctrl+Shift+Q" keys combination to mount the drive and if the drive it is mounted, pressing the same combination of keys or something similar to unmount the drive?

Best regards.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: mikeyww, Shikoweno, songdg and 38 guests