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/win dows settings/scripts (startup/shutdown)/startup there is the following entry: \\hr-srv-01\sysvol\harveyr oad.local\ scripts\wi ndow.cmd
Window.cmd is: Reg.exe import “\\hr-srv-01\software$\cab inetstate. reg”
I cant get this to apply to the client machine directly via GP but if I go to \\hr-srv-01\sysvol\harveyr oad.local\ scripts\wi ndow.cmd from the client machine once logged in it applies and works.
Can anyone tell me what I am doing wrong please?
Window.cmd is: Reg.exe import “\\hr-srv-01\software$\cab
I cant get this to apply to the client machine directly via GP but if I go to \\hr-srv-01\sysvol\harveyr
Can anyone tell me what I am doing wrong please?
It sounds like UAC is blocking the script. Can you create these registry keys with Group Policy Preferences?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!