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.