Link to home
Start Free TrialLog in
Avatar of activateahsd
activateahsd

asked on

Cant get script to run in Group Policy

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?
Avatar of Joseph Moody
Joseph Moody
Flag of United States of America image

It sounds like UAC is blocking the script. Can you create these registry keys with Group Policy Preferences?
Avatar of activateahsd
activateahsd

ASKER

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!
ASKER CERTIFIED SOLUTION
Avatar of activateahsd
activateahsd

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
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!