Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cant get script to run in Group Policy

Posted on 2013-10-28
4
Medium Priority
?
543 Views
Last Modified: 2013-11-03
Hi, I am trying to get a .cmd file script to run on machine startup via GPO. The server is 2012 the clients are Windows 7. In the policy in computer configuration/policies/windows settings/scripts (startup/shutdown)/startup there is the following entry: \\hr-srv-01\sysvol\harveyroad.local\scripts\window.cmd
Window.cmd is: Reg.exe import “\\hr-srv-01\software$\cabinetstate.reg”
I cant get this to apply to the client machine directly via GP but if I go to \\hr-srv-01\sysvol\harveyroad.local\scripts\window.cmd from the client machine once logged in it applies and works.
Can anyone tell me what I am doing wrong please?
0
Comment
Question by:activateahsd
  • 3
4 Comments
 
LVL 22

Expert Comment

by:Joseph Moody
ID: 39605963
It sounds like UAC is blocking the script. Can you create these registry keys with Group Policy Preferences?
0
 

Author Comment

by:activateahsd
ID: 39606730
hi, i have tried that, thats why i went for the startup script as doing it directly in GP didnt work either. I have disabled UAC on the client I am testing on but it hasnt helped. GP never works how you expect it to if at all!
0
 

Accepted Solution

by:
activateahsd earned 0 total points
ID: 39609497
Hi, I found the answer in EE:

"I would like to add that it is not possible via a simple enable or disable option.  You need to add the registry change to the GPO User Configuration\ Preferences\Windows Settings\registry\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\Settings=0c0002000a01000060000000. This will then open each folder in the same window.
 The registry setting to open each folder in its own window is 0c0002002a01000060000000.  Easiest to use the Registry Wizard and import from the 2K8 server you are on. "
0
 

Author Closing Comment

by:activateahsd
ID: 39619698
It is the answer to the issue i was having, i was going about it in a convoluted way when i just needed to import the reg setting directly via GPO, once i found out how to do that in the correct way i didnt need to bother with cmd file calling scripts in sysvol!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently, I was assigned the task of performing a hardware refresh in the datacenter. The previous Windows 2008 systems were connected to the SAN via fiber channel HBA’s and among other thing, had PowerPath installed in order to provide sufficient f…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

877 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