Solved

On Windows Shutdown

Posted on 2002-06-30
4
167 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:raed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 100 total points
ID: 7119785
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
 

Author Comment

by:raed
ID: 7121111
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
 
LVL 45

Expert Comment

by:aikimark
ID: 7121639
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
 

Author Comment

by:raed
ID: 7123817
to make your program a service ?

how can i do that, any sites can help please ???
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question