Tuesday, November 10, 2009

Batch Scripts and Windows Registry

One of the most common tasks you can meet during the batch scripts usage is modification of the Windows registry. It is likely that Microsoft still respects users of batch files because it provides them with several powerful tools allowing to add, delete or change registry keys and their values.
The most useful command is called reg. As it is stated in official manual, this command 'adds, changes, and displays registry subkey information and values in registry entries'.
There is no use in repeating words written by Microsoft, so I should just mention the alternative way to add keys or values to the registry. You can create REG file using your batch script and then call RegEdit to add keys described in this REG file to the registry. Of course, this way may look quite exotically, but it's really useful in some cases.

No comments:

Post a Comment

Translate