Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

vhdmount - change Umount context menu to Drive

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Maniek

Maniek
  • Member
  • 5 posts
  • Joined 28-February 13
  • OS:XP Pro x86
  • Country: Country Flag
Default Mount/Umount command context menu is for VHD files. I want change Umount command from file VHD to mounted Drive like this:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\Umount VHD]

[HKEY_CLASSES_ROOT\Drive\shell\Umount VHD\command]
@="C:\\Program Files\\VHD Mount\\vhdmount.exe /u all"
but this not working :-(
If manually run this command in cmd this working good and umount all mounted images VHD. What's going on? Why this not working from Drive context menu?

Edited by Maniek, 18 May 2013 - 06:14 AM.



How to remove advertisement from MSFN

#2
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,306 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
Take another look at the syntax for REG entries in the link. You're "missing" some characters...

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#3
Maniek

Maniek
  • Member
  • 5 posts
  • Joined 28-February 13
  • OS:XP Pro x86
  • Country: Country Flag

Take another look at the syntax for REG entries in the link. You're "missing" some characters...

Yes, syntax is other but after fix still not working:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\Umount VHD\command]
@="\"C:\\Program Files\\VHD Mount\\vhdmount.exe\" /u \"%1\""


#4
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,306 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
Have you tried ALL of the Reg entries in the Link? You seem to be lacking a couple of critical lines.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#5
Maniek

Maniek
  • Member
  • 5 posts
  • Joined 28-February 13
  • OS:XP Pro x86
  • Country: Country Flag
Mount and Umount from link working good. Now I want only move Umount command to Drive key. Default to umount VHD image need right-click on VHD image. I want right-click to icon drive in My Computer window to umount VHD not for VHD file.
I try also option /u all but it did not work :-( from right-click icon drive. Only working in cmd.

Attached Files


Edited by Maniek, 18 May 2013 - 08:50 AM.


#6
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,306 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
That will probably require some kind of Script to detect the Drive Letter plus trace back to the VHD file. The VHDMOUNT doesn't do that directly. Several "steps" would be necessary -
/q - Displays the disk name of the mounted virtual disk device for the specified VHDFileName.
VHDMOUNT /q VHDFileName | All
"All" then a loop-through of the List "compare to Drive Letter" since the VHDFileName is unknown. :unsure:
Here is the source Article of your link above -
http://technet.micro...5(v=ws.10).aspx

Returns the disk identifier of the mounted virtual disk device for the specified VHDFileName, or on all mounted virtual disk devices. VHDFileName is the fully qualified path of the .vhd file.

...and I guess you mean "Drive Letter" and not "Drive Key"...
No time to Install, Build a Script, and Test the "Theory" right now. Maybe some other Script Experts here can help you out. One might "assume" that the information must be stored somewhere. :unsure:

In which case, this Topic is in the wrong Sub-Forum and should be under the Scripting one...
Maybe here - http://www.msfn.org/...s-cmdbatch-etc/

Edited by submix8c, 18 May 2013 - 08:59 AM.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#7
Maniek

Maniek
  • Member
  • 5 posts
  • Joined 28-February 13
  • OS:XP Pro x86
  • Country: Country Flag

That will probably require some kind of Script to detect the Drive Letter plus trace back to the VHD file.

Maybe you right but why in cmd working command:
vhdmount /u all
It does not need to specify the drive letter to umount image VHD. This umount automatic all mounted images.

#8
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,306 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
It undoubtedly keeps a LIST somewhere (I said that) and loops through ALL of them. That is EXACTLY why I said a Script may be necessary to get a SPECIFIC one.

Why does it work that way? That's how MS wrote it... Two "options" a SPECIFIC.VHD or "All"...

Edited by submix8c, 18 May 2013 - 10:06 AM.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users