I have created a batch file to back up some files from one directory to another: "XCOPY /Y C:SOURCE *.* C:DEST *.*" I've used the gpeditor to add it as a shutdown script and although the shutdown window indicates it is running the shutdown scripts, it doesn't work. However it works if I double-click it. Any idea what might be happening?

It sounds like the problem may be with the policy and not the script itself. I'd start by using GPRESULT to figure out which GPOs have scripts set to run, and figure out the GUID of each GPO using the details in Microsoft Knowledge Base article 216359.

Next I'd look in the folder for each GPO and make sure that the scripts in question are getting replicated from there correctly. One common caveat with shutdown scripts and permissions is that the script has to be something the system account can run (it doesn't run as the Administrator). So make sure the script itself has the proper permissions to do so.

By submitting your personal information, you agree to receive emails regarding relevant products and special offers from TechTarget and its partners. You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

Also, if you're trying to copy from or to a server across a share, you'll probably need to specify a full UNC path (serversharefile.fil) or it may fail silently. If you're fairly sure the script is running, add some kind of diagnostic to the start of the script (i.e., an echo command to a local file, or something like that) to see if it's running and maybe failing because of something you hadn't foreseen.

0 comments

E-Mail

Username / Password

Password

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy