Windows 7 registry: how to edit a registry key by program schedule (batch)?
eg. when a specific registry key value becomes 39 i would have to reset it to 0. A batch is possible? Or what app (language) i could use,开发者_如何转开发 and how? Can you let me see an example? Thanks
If you are a c# developer take a look at this post. It demonstrates how to monitor a registry value using WMI. You can then check the return value and if >= 39 set it to 0 .
Registry Watcher C#
Eample snippet from Registry Watcher C#. Add your registry value change event code here
private void HandleEvent(object sender, EventArrivedEventArgs e)
{
RegistryKey myKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\My Registry Key", true);
myKey.SetValue("My Value", "0", RegistryValueKind.String);
}
精彩评论