Solved

On Windows Shutdown

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

718 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