0
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?
1MSC files are not regedit files; they are Microsoft Management Console Snap-in Control Files. This will not ever work. – krowe – 2013-09-22T04:37:54.093
It's not clear what you're asking. Do you want something to happen when you right-click the MSC? Do you want the MSC to be an option in the context menu when you right-click another type of file, and if so, what type(s) of file(s)? – BillP3rd – 2013-09-22T04:47:10.590
@krowe It has nothing to do to be a file "Reg" or not, I think you haven't understande me, my english is not very good, please see my update, thanks for comment, – ElektroStudios – 2013-09-22T04:58:44.977
@BillP3rd yes, the second option that you have said is more or less what I'm trying to do, the option will be at desktop background contextmenu, I've created the option, the only problem is the MSC file will not start like an exe file starts and I don't know what I need to do to fix the problem about trying to run an MSC file from a registry command value, thanks for comment! – ElektroStudios – 2013-09-22T04:59:33.467
So to be clear, you'd like the option to start DEVMGMT.MSC to appear as an option on the DESKTOP context menu. Is that correct? That's very straightforward, if so. – BillP3rd – 2013-09-22T05:05:07.210
@BillP3rd More or less the answer is YES, A context menu option needs a reg key titled "command", in the Default value of the Command key you need to put the instruction to do (start a process) and that instruction is he thing that happens when you click the option, well, so I need to know how would be the Data of Default value of Command key to run a MSC file. If you can give me an example – ElektroStudios – 2013-09-22T05:12:08.967
I know how to rsolve the problem launching CMD to launch the MSC file, or Wscript host, or using a link, but I'm asking if I can do it in an improved way, maybe I need to add a command before the name of the MSC file to run it or something else.. – ElektroStudios – 2013-09-22T05:13:20.503