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

link|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? – Sam Erde Aug 19 '10 at 17:26
feedback

1 Answer

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.

link|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
feedback

Your Answer

 
or
required, but never shown

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