deadbug Posted December 1, 2007 Share Posted December 1, 2007 I have a .reg file that adds Control Panel to My Computer. It's the usual entry from the tweaks:Windows Registry Editor Version 5.00;=======================================================================; My Computer Right Click;======================================================================= ;----- ;----- Adds Control Panel to right click of MY Computer ;-----[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Control Panel\command]@="rundll32.exe shell32.dll,Control_RunDLL"I want to add this using Window XP's built-in "REG ADD" command, but I cannot find a syntax that works.If I dump a working example with REG QUERY I get this:! REG.EXE VERSION 3.0HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Control Panel\command <NO NAME> REG_SZ rundll32.exe shell32.dll,Control_RunDLLBut my various non-working attempts (in a VM) show an extra REG_SZ after the final RunDLL.Anyone know the correct sequence of commands that I should use?BTW: I'm doing this because I want to be able to apply tweaks individually to other machines, not just when I want to perform an unattended install. I want all the tweaks in one place (WPI's config.js) rather than in umpteen itty-bitty files. Link to comment Share on other sites More sharing options...
Yzöwl Posted December 1, 2007 Share Posted December 1, 2007 Here you go, I've made it in such a way as to hopefully help you understand it better.@Echo offSetlocal Enableextensions:: Create a variable for required keySet "Key=HKLM\SOFTWARE\Classes"Set "Key=%Key%\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"Set "Key=%Key%\shell\Control Panel\command"::Create a variable for the command you wish to runSet "Cpl=rundll32 shell32,Control_RunDLL"::Add key to registry using Reg.exeReg add "%Key%" /ve /d "%Cpl%" /f>Nul Link to comment Share on other sites More sharing options...
deadbug Posted December 1, 2007 Author Share Posted December 1, 2007 Here you go, I've made it in such a way as to hopefully help you understand it better.Reg add "%Key%" /ve /d "%Cpl%" /f>NulThanks - that worked first time! 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