Solved

On Windows Shutdown

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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 trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

773 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