I 'm trying to portabilize a service.
It hasn't a command "Quit" (stay open till windows close).
But if I shutdown my computer, I cannot run the code after EXECWAIT...
I can have only the focus on this service.
Is there a keyboad shortcut to close the service and execute the final part of my code?
Close a service
6 posts
What does close service even mean?
You can stop a service and then delete it, there is no such thing as close.
You can stop a service and then delete it, there is no such thing as close.
Example:
I have an app, Notepad, that miss the command "Quit".
So, I can start, but I cannot close it.
If I shut down the computer, how can I execute the code after ExecWait to recover registry, appdata etc?
If I swith off the program with ctrl+alt+canc the code is execute? NSIS knows notepad is closing and run the remaining instructions?
THE PROBLEM: How can I execute the remaining code after close my app?
I have an app, Notepad, that miss the command "Quit".
So, I can start, but I cannot close it.
If I shut down the computer, how can I execute the code after ExecWait to recover registry, appdata etc?
If I swith off the program with ctrl+alt+canc the code is execute? NSIS knows notepad is closing and run the remaining instructions?
THE PROBLEM: How can I execute the remaining code after close my app?
First you talk about service and now Notepad, make up your mind.
You can send the WM_CLOSE message to Notepad and it will close unless it has unsaved data. If you don't care about saving data you can just kill the process.
You can send the WM_CLOSE message to Notepad and it will close unless it has unsaved data. If you don't care about saving data you can just kill the process.
It's a service, I have made notepad as example...
Anyway your idea about alt+f4 could be good.
Kill the process with NSIS? (KillProcess) I don't know how to do to jump to the line...
What is better, KilProc, KillProcDLL or nsProcess?
Are you sure that NSIS see the service in closing with alt+f4?
thanks
Anyway your idea about alt+f4 could be good.
Kill the process with NSIS? (KillProcess) I don't know how to do to jump to the line...
What is better, KilProc, KillProcDLL or nsProcess?
Are you sure that NSIS see the service in closing with alt+f4?
thanks
You can't close a service with a message because services run in a different session.