|
-
Feb 11th, 2011, 11:24 PM
#1
Thread Starter
Addicted Member
How to run a script when windows shutsdown in XP Home
Hi I found a tute which explains how to run a script on shutdown via mmc and windows group policy object: http://www.tutorial5.com/content/view/157/47/ . The problem is that there does not seem to be a Group Policy Object available as a snap in for XP Home edition. Is there any way to do this in XP Home?
-
Feb 12th, 2011, 06:38 AM
#2
Re: How to run a script when windows shutsdown in XP Home
Is there a VB6 question here somewhere?
-
Feb 12th, 2011, 06:53 AM
#3
Thread Starter
Addicted Member
Re: How to run a script when windows shutsdown in XP Home
It turns out there is a scheduled tasks system tool on XP home, although it doesn't have an on user logoff option. If there are no windows tools to enable me to run code when a user logs off, eg to back up files, I may have to code a solution. Surely this must be a relatively common dev issue.
-
Feb 12th, 2011, 07:02 AM
#4
Re: How to run a script when windows shutsdown in XP Home
When the user logs off your running programs get notified and the QueryUnload and Unload events occur. That's where you clean up.
Trying to trigger backup processes on logoff would make the logoff process take a long time, leaving the machine tied up so the next user must wait quite a while. It wasn't found useful enough to have a "run on logoff" in Task Scheduler so the option wasn't offered.
On later versions of Windows when a PC has advanced power management capability you can have Scheduler wake up the machine off-hours to do backups, etc. Or you can always schedule backups to happen at some preset time every day, every week, etc.
-
Feb 12th, 2011, 07:03 AM
#5
Re: How to run a script when windows shutsdown in XP Home
This isn't really a "dev issue" because applications don't own the machine.
Backup scheduling is an admin function, entirely separate from applications.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|