Link to home
Start Free TrialLog in
Avatar of gioberty
gioberty

asked on

GPO Policy not running cmd script

I have a Windows 2008 Server R2 64bits, i have created a gpo policy for running a cmd script, also apply some templates for active desktop. The problem is that is just appling the templates but is not running the cmd script. The script is located in the default directory for users logon scripts
policy.jpg
Avatar of kaeadmin
kaeadmin
Flag of United Kingdom of Great Britain and Northern Ireland image

I'm not sure what your script actually looks like, could you provide the code?  Also, I've never used .cmd in a logon script, I always use .bat, so that the batch file runs on logon, but I believe you can use the .cmd extension.

Try it with .bat, and if that fails, copy the script here and more people can help.

Regards,
Avatar of gioberty
gioberty

ASKER

I have tried with .bat and .cmd and fails

The code is this
Windows Registry Editor Version 5.00

@echo off
REG DELETE "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\" /v  Proxy /f
REG DELETE "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\" /v  ConnectionsTab /f


REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1  /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /d "192.168.*.*"  /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "192.168.1.200:8080" /f
REG ADD "HKCU\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /d "http://www.espalsa.com.do" /f
_____________________________________

I put pauses to realiza if the script was running and is not, so thje code is not the problem, the problem is that is not been run
It this line within your script or was is just from a copy/past?

Windows Registry Editor Version 5.00

Turn  echo on and run the script manually from a client. Open it directly from \\domain\sysvol\policies\..\..\

Does it run without any problems?
Also have you checked the event viewer for errors?

Cheers!
Hi, run the script manually from the server it runs perfectly. Im looking for problems in Active Directory, maybe its something wrong because i put the user in domain admin group and it's not reflecting the change
ASKER CERTIFIED SOLUTION
Avatar of kaeadmin
kaeadmin
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Excellent. Calling the reg from a cmd and running the cmd as script it works perfect now. I just have to figure out how give permission to create registry keys to the user because if the key exist the user can modify the value, but if it does'n exist cannot creat it