0

Thanks for taking the time to read this.

I am having trouble getting my startup scripts to run correctly on the domain I am administering. Before anyone gets upset and says "go read xxx article from microsoft",... I have. I am simply missing something or not understanding it properly. I understand how to assign the script, what I am curious about is where exactly it should be placed in the Windows folder structure. I have been able to get them to work by creating a share folder called "scripts" and pointing to that exact unc pathname IE \servername\scripts\xxx.bat. However, I would like to do it properly, would someone please tell me where they should be placed in Win2003 server, and what the path name should be when assigning a group policy to do something that applies to computer specific properties? Your assistance is very much appreciated by a junior admin trying to learn some new tricks!

3 Answers 3

1

The script gets placed in "domain\sysvol\domain\policies\policy guid\machine\scripts\startup" folder. The easiest and recommended way to add a script is to edit the GPO that applies to the computer(s) in question using GPMC, expand Computer Configuration, Expand Windows Settings, select the Scripts item in the left pane, double-click the Startup item in the right pane, click the Show Files button, and paste your script into the windows explorer window that opens, close the explorer window, click the Add button, type the name of the script in the "Script Name" field, click OK, click OK again, and close the GPMC.

1
  • Thank you so much. Your advice is very appreciated! Turns out it looks like some of the scripts were not built correctly!
    – Az.
    Mar 25, 2010 at 18:32
1

For the best results I think your startup and login script should be stored and referenced from a path somewhere under sysvol so the can be replicated out to all the domain controllers.

When you create a policy you and click the 'Browse button' you will find that the default path where the scripts would be created would be a folder like this. Putting things here in this location is fine and not uncommon.

\\domain.tld\SysVol\domain.tld\Policies\{6380CAEE-DF69-4AF2-A3BB-F0EEB4DC8801}\Machine\Scripts\Startup

Another common location where people place their scripts in the netlogon folder. I tend to prefer this because you can use better folder and script names.

\\domain.tld\SYSVOL\domain.tld\scripts (aka \\domain.tld\netlogon)
8
  • I've never been prompted for the location of the policy when creating a new policy. Also, I could be mistaken but I believe that the NETLOGON folder is for legacy user logon scripts, not for computer startup scripts.
    – joeqwerty
    Mar 25, 2010 at 17:36
  • +1 - The NETLOGON location is a very nice place to store scripts. It's a lot easier to find them there to edit. Mar 25, 2010 at 17:40
  • 1
    @joeqwerty: The NETLOGON location is part of the SYSVOL, so it's replicated to all the DCs. It makes a nice place to store scripts. Technically, the GPO can reference any location for the script, but it makes good sense to reference a location that's part of the SYSVOL (since it'll be replicated). That is also the location where legacy logon scripts are stored, but that doesn't affect its ability to be used for other scripts. Mar 25, 2010 at 17:41
  • @joeqerty, I guess prompted is the wrong word. I guess I mean that it will be path that is set as the default in the dialog box that is displayed when clicking the browse button to select a script. I have updated the answer to hopefully make that more clear.
    – Zoredache
    Mar 25, 2010 at 18:05
  • 1
    @joeqwerty, If you set the path properly in the policy then startup scripts run fine from netlogon in my experience, and I used them from that location on several separate domains.
    – Zoredache
    Mar 25, 2010 at 18:38
0

Just re-read your question. I think what you want to do is assign login scripts via Group Policy if I understand your question correctly.

This article will help: http://www.computerperformance.co.uk/Logon/logon_script_assign.htm

If it's not working on the workstations, try running the following on the workstation:

gpupdate /force /sync /boot

Also make sure that the Group Policy is being applied to your workstations as well. You can run the gpresult command from the workstations(s) to see/make sure it's applying correctly.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .