madcyryl Posted April 24, 2009 Posted April 24, 2009 I am looking to run add a registry entry when a user first logs onto a workstation via group policy by having a startup script (.bat) run a .reg file. The batch file is "regedit /s outlook.reg" which runs but still requires user intervention to actually install the reg change although i am using the /s silent switch. The strange thing is is that if i go into the user gpo>user configuration>administrative templates>system and enable "prevent access to registry editing tools" and the user then logs on, the user gets the error message stating that they are unable to edit the registry due to restrictions (which is what i would expect) they can then click ok and it enters the reg key anyway! I would either like the regedit /s key to do its stuff I.E not prompt the user to add the key or remove the dialogue box stating that registry editing tools has been disabled by your administrator. Any suggestions?
Bezwick Posted April 24, 2009 Posted April 24, 2009 You might find it easier to run using a script instead as that wont require user intervention to modify registry settings. Here is a script we use that modifies several registry settings, you might be able to use it as a guide on how to make one that changes the settings you want. _______________________________________________________________________________________ Set WshShell = CreateObject("WScript.Shell") On error Resume Next WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MaxConnectionsPer1_0Server",10,"REG_DWORD" WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MaxConnectionsPerServer",10,"REG_DWORD" WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz\NoRun",0,"REG_DWORD" WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\EnableBalloonTips",0,"REG_DWORD" WSHShell.RegWrite "HKCU\software\microsoft\windows\CurrentVersion\Explorer\Advanced\NoNetCrawling",1,"REG_DWORD" WSHShell.RegWrite "HKCU\Control Panel\Desktop\MenuShowDelay", 999 WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLowDiskSpaceChecks",0,"REG_DWORD" WSHShell.RegWrite "HKCU\Control Panel\Desktop\DragHeight",4 WSHShell.RegWrite "HKCU\Control Panel\Desktop\DragWidth",4 WSHShell.RegWrite "HKLM\System\CurrentControlSet\Control\PriorityControl\IRQ8PRiority" ,1,"REG_DWORD" WSHShell.RegWrite "HKLM\System\CurrentControlSet\Control\Update\UpdateMode" ,0,"REG_DWORD" WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL\","1" WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf","@SYS:DoesNotExist" _____________________________________________________________________________________________ good luck 1
Brpilot99 Posted April 24, 2009 Posted April 24, 2009 Hiyah ... just a thought, have you tried using the full path to regedit? ie c:\windows\regedit.exe /s outlook.reg Ive always done it that way and have never had any problems Cheers Brian 1
srochford Posted April 24, 2009 Posted April 24, 2009 It's just possible that the "/" is somehow being lost - try doing it with regedit -s The other thing you can try to see what's going on is to run sysinternals procexp when the regedit pop up is on screen - this will tell you the exact command that has been used and you can see if it's regedit that is somehow misbehaving or if it's being called in the wrong way.
K.C.Leblanc Posted April 24, 2009 Posted April 24, 2009 You probably need to specify the location of the .reg file and it'll need to be somewhere a users can access it. Bare in mind that the script is running at the workstation, not the server. You could also use the reg write command Reg - Edit Registry
Chuckster Posted April 24, 2009 Posted April 24, 2009 In a .BAT file I have this.. @echo off %windir%\regedit.exe /s \\Servername\netlogon\LogonScripts\outlook.reg Hope this helps.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now