Logoff Batch File Does Not Run

January 6, 2011 at 11:35:46
Specs: Windows XP Pro
Hello. To keep this simple I want to run a batch file that copies files from my C:\ drive to a network shared drive. The problem is that when Windows logs you off it also closes the network connections. Is there something I can put in the batch file to keep the network connections open? Any suggestions would be great.

See More: Logoff Batch File Does Not Run

Report •

January 6, 2011 at 12:02:33
How are you running the batch file?

Report •

January 6, 2011 at 12:55:14
I am using gpedit.msc and having it run when a user logs off. It always fails to run. I ran it by itself to make sure there wasn't anything wrong with the batch file. Like I said it just copies files from C to a network drive.

Report •

January 6, 2011 at 14:29:18
Is this a DOMAIN netowrk? "gpedit.msc", is only for local logons. You should be doing the GPO settings on the Domain Controller.



I don't know what version of server you are using or if you are using server but this should help.

Also are you doing it under Shutdown Scripts under Computer Configuration or Logoff Scripts under User Settings?

Last, have your tried NET USE command to map drives in your scripts or even tried using UNC pathing. UNC Pathing should work even if a drive map is removed.

Report •

Related Solutions

January 6, 2011 at 19:43:01
This is a home network so I have a workgroup not a domain if that information helps. It is a mapped drive. I haven't read the linked article yet but I will. I actually set it up both ways. I set it under the computer settings for the shutdown option and also under the user settings for the log off option. I have not tried NET USE yet but I will and then I will try using UNC pathing. Thanks for the article.

Report •

January 7, 2011 at 17:16:43
I tried using the UNC path to the destination drive and it still failed. You mentioned using NET USE. Would this be added to the batch file to map the drive then copy the files then delete the mapped drive?

Report •

Ask Question