I have a logoff script created with gpedit.msc
It runs a .bat file. that sync's the files on my desktop with those on my WHS.
However it only works if I first open gpedit.msc or console.msc
If I log onto the PC without opening gpedit.msc and log off again the script fails to run!
I wonder if anyone has any ideas?
Welcome to We Got Served Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Gpedit.msc
Started by
spile
, Jun 24 2012 09:23 AM
#1
Posted 24 June 2012 - 09:23 AM
#2
Posted 28 June 2012 - 01:36 AM
about the only useful info I've found is maybe put "%comspec%" infront of the batch file. Or better yet, %comspec% /k file.bat"
Other than that, .... no idea. Tried looking into the event viewer?
Also, any reason you're using gpedit instead of just making a new scheduled task?
Other than that, .... no idea. Tried looking into the event viewer?
Also, any reason you're using gpedit instead of just making a new scheduled task?
#3
Posted 05 July 2012 - 06:30 PM
Adding %compec% etc to the bat file doesn't do anything other than make log off take up to 15 minutes but thanks for the suggestion.
The following lines added to the .bat file shows that the script is being run but the lines to invoke SyncToy do not (they work fine if the bar file is run or gpedit.msc is run before logging off.
I looked at Task scheduler but it doesn't have a trigger for "Log off"
The following lines added to the .bat file shows that the script is being run but the lines to invoke SyncToy do not (they work fine if the bar file is run or gpedit.msc is run before logging off.
I looked at Task scheduler but it doesn't have a trigger for "Log off"
#4
Posted 07 July 2012 - 07:38 AM
After further investigation of the SyncToy logs I've found the following:
*** Failed to execute folder pair PC - WHS. Could not locate folder \\MyServer\Users\Share\.
It would therefore appear that the connection to the server is being lost before the logoff script completes.
Why running gpedit.msc causes the connection to remain I don't know.
My next step is to map the server shares to a letter to see if that retains the server connection so that the synctoy command can complete.
*** Failed to execute folder pair PC - WHS. Could not locate folder \\MyServer\Users\Share\.
It would therefore appear that the connection to the server is being lost before the logoff script completes.
Why running gpedit.msc causes the connection to remain I don't know.
My next step is to map the server shares to a letter to see if that retains the server connection so that the synctoy command can complete.
#5
Posted 10 July 2012 - 05:00 PM
Changing to the mapped drive letter made no difference. This issue is that the network drive is being logged off as soon as the logoff command it started and there doesn't appear to be a way of stopping it..
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users






Back to top
Contributor







