Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to lock a system registry key from being changed? Or to somehow keep it constant?

In Windows 7, I'm trying to prevent a system registry key from being automatically changed any time a monitor is turned off or my system is rebooted.

NOTES

The key is in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{39de53a5-eb32-44e2-a457-eca85387442b}\Properties

It's where Windows sets the properties for a particular sound device (my HDMI sound output). Anytime a monitor is turned off or system rebooted, Windows resets the speaker configuration of this device to a 2-channel "Stereo" setup, and resets the sampling rate/bit depth to 16bit/44KHz.

I'd like to lock the respective keys/properties to prevent Windows from constantly resetting them.

Without any pre-clearance from those knowledgable, I'm hesitant to tamper with permissions of a system-level key like this. If this is an impossibility to lock a system-level key such as this, is there a way I can somehow script/program a way to poll this registry key, and if changed, set it back to the settings I want?

Any ideas?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can set permissions for registry keys. Just remove Edit permissions from SYSTEM and the Administrators group and the key should be effectively read only.


However if that does not work you can just use the reg command in a start-up script and have it reset your key every time you unlock your computer.

share|improve this answer
    
Thanks! So am I not playing with "fire" by locking a system registry key such as this? I fear that I'd incur the godly wrath of the Windows kernel by doing so :/ –  Coldblackice Apr 19 '13 at 0:23
    
Honestly, I don't know. Doing this could do anything from resetting the security settings and doing nothing at all to giving you a BSOD the first time it tries to reset it. Make sure you backup your system before you try anything –  Scott Chamberlain Apr 19 '13 at 2:55
    
Gotcha. Much obliged! –  Coldblackice Apr 20 '13 at 6:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.