Windows Server 2000/2003 Thread, Regedit /s in Technical; I am looking to run add a registry entry when a user first logs onto a workstation via group policy ...
24th April 2009, 11:09 AM #1
- Rep Power
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.
24th April 2009, 11:18 AM #2
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\In ternet Settings\MaxConnectionsPer1_0Server",10,"REG_DWORD "
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\MaxConnectionsPerServer",10,"REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Ex plorer\Desktop\CleanupWiz\NoRun",0,"REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Ex plorer\Advanced\EnableBalloonTips",0,"REG_DWORD"
WSHShell.RegWrite "HKCU\software\microsoft\windows\CurrentVersion\Ex plorer\Advanced\NoNetCrawling",1,"REG_DWORD"
WSHShell.RegWrite "HKCU\Control Panel\Desktop\MenuShowDelay", 999
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Po licies\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\PriorityCon trol\IRQ8PRiority" ,1,"REG_DWORD"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Control\Update\Upda teMode" ,0,"REG_DWORD"
WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Ex plorer\AlwaysUnloadDLL\","1"
WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf","@SY SoesNotExist"
Thanks to Bezwick from:
madcyryl (24th April 2009)
24th April 2009, 11:21 AM #3
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
Thanks to Brpilot99 from:
madcyryl (24th April 2009)
24th April 2009, 12:12 PM #4
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.
24th April 2009, 12:31 PM #5
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
24th April 2009, 12:48 PM #6
In a .BAT file I have this..
Hope this helps.
%windir%\regedit.exe /s \\Servername\netlogon\LogonScripts\outlook.reg
By LCPSWolf in forum Windows
Last Post: 19th March 2009, 03:20 PM
By karldenton in forum Windows
Last Post: 8th August 2008, 02:54 PM
By projector1 in forum How do you do....it?
Last Post: 12th May 2008, 08:43 AM
By kevin_lane in forum Windows
Last Post: 18th April 2008, 12:24 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)