scenario
I have an .msc file associated to a command of a personalized contextmeni item , which is stored in a reg value as a context menu option?.
This is the registry script:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\CPanel.Administrador.de.discos]
@="Administrador de discos"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\CPanel.Administrador.de.discos\command]
@="devmgmt.msc"problem
When I click on the contexontextmenu item, absolutelly nothing happens.
question
How to run an MSC file from registry?
71 Answer
The problem is that you need to run the *.MSC files as arguments to mmc like this:
C:\Users\me>mmc C:\Windows\system32\devmgmt.mscThis doesn't work in your registry entries because they are not executables. Here is the updated regedit file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\CPanel.Administrador.de.discos]
@="Administrador de discos"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\CPanel.Administrador.de.discos\command]
@="mmc C:\Windows\system32\devmgmt.msc" 3