Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I apologize if this is listed elsewhere, but I truly couldn't find it. Does anyone know how to silently modify registry keys in Windows 7? I've tried running regedit with the /S command line switch, but it still prompts the user for permission to modify the keys before proceeding. Any help would be much appreciated.

Andy

share|improve this question
1  
Please clarify the question. Are you trying to just run regedit without the UAC prompt, or are you pushing a .REG file to your users? –  SturdyErde Aug 19 '10 at 17:26

1 Answer 1

up vote 2 down vote accepted

Since you're talking Windows 7, you will probably have better luck using a PowerShell script to handle this.

http://technet.microsoft.com/en-us/library/dd315394.aspx

New Entry:
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion -Name PowerShellPath -PropertyType String -Value $PSHome
New Key:
New-Item -Path Registry::HKCU_DeleteMe

Microsoft makes sure that Regedit is noisy when it comes to importing registry keys. This is not true of other methods.

share|improve this answer
    
Didn't even think of PowerShell, can't imagine that not working for what I need to do. This is why I hang out here. Thanks guys! –  awilson53 Aug 19 '10 at 17:36
    
Powershell should be fail at this command unless you run powershell in an elevated command prompt. The message should be "New-ItemProperty : Requested registry access is not allowed" –  Jim B Aug 20 '10 at 0:01

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.