Chapter 12. Working with the Windows Registry and Event Logs

Through Windows Script Host, you can manage the Windows Registry and the Windows event logs. The registry stores configuration information for the operating system, applications, services, and more. By examining and changing registry information in scripts, you can reconfigure a system so that it runs exactly the way you want it to. The event logs track essential processes on a system and can also be used in auditing system activity. By examining event logs through scripts, you can analyze system activity and monitor a system for problems.

Note

Some of the scripts in this chapter are not fully working examples. The scripts may only highlight the syntax of how the commands could be used in a complete script. Also, you may need to replace registry paths with your own if you are trying the examples on your own computer.

Working with the Windows Registry

The Windows Registry stores configuration settings. Through Windows scripts, you can read, write, and delete registry entries. Because the registry is essential to the proper operation of the operating system, you should only make changes to the registry when you know how these changes will affect the system. Improperly modifying the Windows Registry can cause serious problems. If the registry gets corrupted, you may have to reinstall ...

Get Microsoft® PowerShell, VBScript and JScript® Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.