Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cant get script to run in Group Policy

Posted on 2013-10-28
4
Medium Priority
?
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Resolve DNS query failed errors for Exchange
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 of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

705 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