Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

I am running a Windows Vista (no gpedit.msc unfortunately) computer and I want to run a backup at logoff. So, when the user tries to shutdown the computer, I want to run a .bat file which executes the backup. The shutdown process must wait until the process is finished, and turn the computer off only then. How can I do this? I have tried the following solutions but none of them worked:

http://blog.ukstokes.com/2008/01/19/vista-run-a-script-at-shutdown/
(using task scheduler and security event 4634/4647)

Running a batch file on logoffRunning a batch file on logoff
(using "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff\0\0" directly)

http://bimalesh.blogspot.cz/2012/02/how-to-run-script-on-logoutshutdown-in.html
(using task scheduler with system event 1074)

http://social.technet.microsoft.com/Forums/windows/en-US/eeddeffb-7f06-4cc7-9615-56f374f6157d/task-scheduler-trigger-logout?forum=w7itproinstall
(using task scheduler with system event 7002)

I am running a Windows Vista (no gpedit.msc unfortunately) computer and I want to run a backup at logoff. So, when the user tries to shutdown the computer, I want to run a .bat file which executes the backup. The shutdown process must wait until the process is finished, and turn the computer off only then. How can I do this? I have tried the following solutions but none of them worked:

http://blog.ukstokes.com/2008/01/19/vista-run-a-script-at-shutdown/
(using task scheduler and security event 4634/4647)

Running a batch file on logoff
(using "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff\0\0" directly)

http://bimalesh.blogspot.cz/2012/02/how-to-run-script-on-logoutshutdown-in.html
(using task scheduler with system event 1074)

http://social.technet.microsoft.com/Forums/windows/en-US/eeddeffb-7f06-4cc7-9615-56f374f6157d/task-scheduler-trigger-logout?forum=w7itproinstall
(using task scheduler with system event 7002)

I am running a Windows Vista (no gpedit.msc unfortunately) computer and I want to run a backup at logoff. So, when the user tries to shutdown the computer, I want to run a .bat file which executes the backup. The shutdown process must wait until the process is finished, and turn the computer off only then. How can I do this? I have tried the following solutions but none of them worked:

http://blog.ukstokes.com/2008/01/19/vista-run-a-script-at-shutdown/
(using task scheduler and security event 4634/4647)

Running a batch file on logoff
(using "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff\0\0" directly)

http://bimalesh.blogspot.cz/2012/02/how-to-run-script-on-logoutshutdown-in.html
(using task scheduler with system event 1074)

http://social.technet.microsoft.com/Forums/windows/en-US/eeddeffb-7f06-4cc7-9615-56f374f6157d/task-scheduler-trigger-logout?forum=w7itproinstall
(using task scheduler with system event 7002)

Source Link
Paya
  • 257
  • 1
  • 5
  • 16

Run task at logoff and wait until it finishes

I am running a Windows Vista (no gpedit.msc unfortunately) computer and I want to run a backup at logoff. So, when the user tries to shutdown the computer, I want to run a .bat file which executes the backup. The shutdown process must wait until the process is finished, and turn the computer off only then. How can I do this? I have tried the following solutions but none of them worked:

http://blog.ukstokes.com/2008/01/19/vista-run-a-script-at-shutdown/
(using task scheduler and security event 4634/4647)

Running a batch file on logoff
(using "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff\0\0" directly)

http://bimalesh.blogspot.cz/2012/02/how-to-run-script-on-logoutshutdown-in.html
(using task scheduler with system event 1074)

http://social.technet.microsoft.com/Forums/windows/en-US/eeddeffb-7f06-4cc7-9615-56f374f6157d/task-scheduler-trigger-logout?forum=w7itproinstall
(using task scheduler with system event 7002)