|
|
#1 |
|
Junior Member
Join Date: Feb 2008
Posts: 1
|
Uninstall on shutdown
Hi
I need to run uninstall on shut down, log off etc. Currently I have C++ application which calls CreateProcess winapi function after it receives WM_QUERYENDSESSION message, but this doesn't work. CreateProcess returns TRUE, but nothing happens really (and I tried it also with other programs). Is there any way how to run uninstall when user is trying to shut down ? Thank you os00 |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Feb 2008
Posts: 5
|
this is not really nsis discussion ...
anyway, just try to create a "shutdown" folder in "start menu/programs" and create a shortcut to your App ... |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
os00: do you return 0 for WM_QUERYENDSESSION to cancel the shutdown? If not, at some point in the shutdown cycle, it is no longer possible to start new processes. If you need Vista support, you should use ShutdownBlockReasonCreate aswell. But this is not really nsis related, and it is a very strange thing to do. See http://msdn2.microsoft.com/en-us/library/bb394721(VS.85).aspx for more
robbynaze: wtf are you talking about? IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Feb 2008
Posts: 5
|
Quote:
i simply forgot to add following link to HSLAB Shutdown Folder, this little application let you to create a folder "shutdown" (such as Start) in StartMenu/programs, you just add the programs you want to run when User's trying to shut down it was just a different solution to its question without any C++ coding ... |
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
That link to the software for a Shutdown folder looks interesting, but os00 may not be willing to add the cost to his product -- each copy he distributes will need a business license which costs $50 each.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|