Old 5th February 2008, 20:43   #1
os00
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
os00 is offline   Reply With Quote
Old 6th February 2008, 07:36   #2
robbynaze
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 ...
robbynaze is offline   Reply With Quote
Old 6th February 2008, 07:48   #3
Anders
Moderator
 
Anders's Avatar
 
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
Anders is offline   Reply With Quote
Old 6th February 2008, 10:06   #4
robbynaze
Junior Member
 
Join Date: Feb 2008
Posts: 5
Quote:
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 ...
robbynaze is offline   Reply With Quote
Old 6th February 2008, 14:08   #5
demiller9
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.
demiller9 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump