Reproduce and automate systems configuration changes

Microsoft Windows is by design a graphical user interface. Sometimes this fact runs counter to the desire to have the computer automate simple tasks. For example, I recently had a request to disable the audio output from systems during specific hours of operation. This is a simple task to perform while seated at the keyboard, but after a brief search I was unable to locate a direct method that would have the computer perform this task itself.

Recognizing that Windows stores most of its configuration information in the registry, I concluded that I could accomplish my goal by detecting the registry settings that changed when I manually muted and enabled the system's audio. To capture the change to the registry, I used an excellent freeware utility called RegMon from

Requires Free Membership to View

SysInternals.com. This utility recorded all of the changes to the registry that occurred during the short window of time that I changed the audio settings. With this information, I was able to determine the registry key that Windows uses to control this feature.

Knowing the correct registry key, I then opened Regedit and navigated to the key. I used the Regedit "Export Registry File" feature to create an executable .reg file that would change the desired key. I created one .reg file with the setting for audio enabled and one with the setting for audio disabled. I then used the Windows "Scheduled Tasks" subsystem (Accessories - System Tools menu) to schedule each of these .reg files to execute at the desired times.

While there are probably other ways to accomplish this specific task, the techniques used here have broad applications. Monitoring for a specific registry change, generating a .reg file to duplicate the behavior, and Scheduling the .reg file to execute the change on demand provide simple mechanisms to control tasks that may be otherwise inaccessible other than through the GUI.

This was first published in March 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.