Solved

On Windows Shutdown

Posted on 2002-06-30
4
162 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
  • 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now