Execute batch script on windows 7 logout or login
Sorry, used a german windows version for the screenshots. I am currently on holiday and had to use this version. Will change them next week.
A useful addition to the robocopy backupscript is an automatic execution at specific events. Like on login or logout or system startup.
To configure this you need to edit the group policies. Press start and enter gpedit.msc.
Next you navigate to the user configuration -> windows settings -> scripts section in the application.
Double click on the event you would like to trigger your script. Like logout for example.
Select your script, in my case backup.bat. Copy the file to the destination shown when you press the button ‘files’.
You might want to activate under admin-templates -> system -> scripts the output for your script, so you know what your computer is doing.