On Windows Shutdown

i can run an app. when windows first load by using the reg. key ..software..currentversion\run
i want to run my.exe when windows unload i mean before restart or shutdown performed.
raedAsked:
Who is Participating?
 
aikimarkCommented:
1. Start your program when the system starts.
2. Add code in the QueryUnload event that will detect the type of termination requested (user, system).
3. Cancel any user requests and do your pre-shutdown work if a system request.
0
 
raedAuthor Commented:
great , (i allready do that)
i'll accept the answer but
isn't there any reg key to do that,
guess my program didn't start for any reason.

thanx
0
 
aikimarkCommented:
The only alternative I can think of is to make your program a service.  Windows is not in a mood to start-up application programs at the same time it is shutting (itself and applications) down.
0
 
raedAuthor Commented:
to make your program a service ?

how can i do that, any sites can help please ???
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.