os00
5th February 2008 21:43 UTC
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
robbynaze
6th February 2008 08:36 UTC
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 ...
Anders
6th February 2008 08:48 UTC
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?
robbynaze
6th February 2008 11:06 UTC
Is there any way how to run uninstall when user is trying to shut down ?
i understood that Anders wanted to run some stuff at shutdown
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 ...
demiller9
6th February 2008 15:08 UTC
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.