reboot12 Posted May 18, 2013 Share Posted May 18, 2013 (edited) 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 May 18, 2013 by Maniek Link to comment Share on other sites More sharing options...
submix8c Posted May 18, 2013 Share Posted May 18, 2013 Take another look at the syntax for REG entries in the link. You're "missing" some characters... Link to comment Share on other sites More sharing options...
reboot12 Posted May 18, 2013 Author Share Posted May 18, 2013 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\"" Link to comment Share on other sites More sharing options...
submix8c Posted May 18, 2013 Share Posted May 18, 2013 Have you tried ALL of the Reg entries in the Link? You seem to be lacking a couple of critical lines. Link to comment Share on other sites More sharing options...
reboot12 Posted May 18, 2013 Author Share Posted May 18, 2013 (edited) 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. Edited May 18, 2013 by Maniek Link to comment Share on other sites More sharing options...
submix8c Posted May 18, 2013 Share Posted May 18, 2013 (edited) 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. Here is the source Article of your link above -http://technet.microsoft.com/en-us/library/cc708295%28v=ws.10%29.aspxReturns 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. In which case, this Topic is in the wrong Sub-Forum and should be under the Scripting one...Maybe here - http://www.msfn.org/board/forum/66-programming-c-delphi-vbvbs-cmdbatch-etc/ Edited May 18, 2013 by submix8c Link to comment Share on other sites More sharing options...
reboot12 Posted May 18, 2013 Author Share Posted May 18, 2013 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 allIt does not need to specify the drive letter to umount image VHD. This umount automatic all mounted images. Link to comment Share on other sites More sharing options...
submix8c Posted May 18, 2013 Share Posted May 18, 2013 (edited) 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 May 18, 2013 by submix8c Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now