|
|
|
|
Obligatory WarningThe registry is the heart of the system. If you mess up your registry, it is possible to mess up Windows to the point that it won't work. Make darned sure that you have a registry backup. TermsRegistry terms are not quite what you'd expect so here's a quick rundown.
Simplified SyntaxThis is not meant to be a comprehensive explanation of how to use RegEdit, just a quick compendium of the stuff that I find most useful. RegEdit can do a lot more than what I'm going to talk about and, truth be told, if you really want to do some fancy registry manipulation in a script, go for WSH instead. Having said that, the syntax to run a script is dead simple.
RegEdit [/s] script.reg
Adding A ValueA value needs to have a place to be located and its data needs a type. In the case of a string, the data type is specified because the string is in quotes. Quoted strings that have an embedded '\' in them must duplicate the '\' or bad things happen. Sooner or later, you'll forget that and it is going to cost you dearly.
[HKEY_CURRENT_USER\Software\Haggard And
Associates\BuildComplete\Settings]
"Last Dir"="\\\\guinness\\software\\kits\\SOM\\som-dev" "Logging"=dword:0000001f Deleting A ValueTo delete a value, specify a dash (-) for the value's data.
[HKEY_CURRENT_USER\Software\Haggard And
Associates\BuildComplete\Settings]
"Last Dir"=- "Logging"=- Delete A SubkeyDeleting an entire sub key is easy. Just prepend a tilde (~) to the subkey name and away it goes along with everything it owns.
[~HKEY_CURRENT_USER\Software\Haggard And
Associates\BuildComplete\Settings]
|
|
|