Solved

GPO Policy not running cmd script

Posted on 2013-01-22
8
794 Views
Last Modified: 2013-01-25
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
0
Comment
Question by:gioberty
8 Comments
 
LVL 1

Expert Comment

by:kaeadmin
ID: 38806598
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,
0
 

Author Comment

by:gioberty
ID: 38806716
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
0
 
LVL 21

Expert Comment

by:snusgubben
ID: 38806819
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?
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 3

Expert Comment

by:hench01
ID: 38806839
Also have you checked the event viewer for errors?

Cheers!
0
 

Author Comment

by:gioberty
ID: 38806959
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
0
 
LVL 1

Accepted Solution

by:
kaeadmin earned 500 total points
ID: 38808985
Does the user have rights to edit the registry?

Also, have you tried creating a .reg file, then calling that from the script instead?

The script would be something like:

reg import \\server\files\regchange.reg

Also check the permissions on the GPO:

Edit the GPO, then at the very top, right click the name of the GPO and select Properties, select the security tab and ensure Domain Admins aren't set for Deny.
0
 

Author Comment

by:gioberty
ID: 38810308
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
0
 
LVL 1

Expert Comment

by:kaeadmin
ID: 38818486
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question