Archive: Reboot computer


Reboot computer
Hi,

I'm executing an executable file embeeded in my NSIS setup.
My problem is that the service of the installed application is not running at the end of that executable file.

I have checked for a Service plugin, that doesn't work (error 1060, the specified service is not an installed service).


So I want to restart the computer before continuying my NSIS setup, so that my service can start correctly before I continue my NSIS setup.

Is it possible to reboot the computer ans to automatically continue the NSIS setup when the computer is started again ?

Thanks for your answers


You need to split your installer into two exe files and add the 2nd to RunOnce registry.

Edit: Why does it say the service isn't installed? Have you installed it or does your application do it? You could install it using the SimpleSC plugin saving you from rebooting.

Stu


The service is installed by the installer launched through the NSIS script.
The installer is to install PostgreSQL and the service is not run at the end of the install.

So when I try to get it like that :

SimpleSC::ServiceIsRunning "MyService"
Pop $0 ;
Pop $1 ;

Messagebox MB_OK "Service running ? ==> $0"

That displays the following message

Service running ? ==> 1060

And the error 1060 means that "The specific service does not exist as an installed service"

Don't know why ... If you have any ideas...


Can you not just have the reboot option on the finish page like you usually would or do you need to perform more actions after the reboot?

Stu


Yes, the problem is that I need to perform more actions after the reboot...


You will have to make another installer which just has the instfiles page and a finish page which you extract in the first installer and set to run in RunOnce before rebooting.

Stu