PDA

View Full Version : cannot stop reboot



NewsArchive
05-23-2014, 01:34 AM
Hello,

SB 8.1.4227

I cannot get my SB installer to prevent a reboot. When running in silent
mode the installer causes an automatic reboot when one of my services fails
to stop - this is expected of course, but I do not want an automatic reboot
under any circumstances.

I have this added to the installer script:

Set Installer Flag $SB RESTARTFLAG$ To "0"

The reboots still happen - what am I doing wrong?

regards,

Chuck

NewsArchive
05-23-2014, 01:35 AM
If there are in-use files that get replaced, it's hard to avoid.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
05-23-2014, 03:05 AM
Chuck,

I have created a test script. At the end of the script I have added:

Set Installer Flag $SB_RESTARTFLAG$ to "0"

In silent install mode, the file to be replaced is in-use (locked). No
reboot message at all and no "automatic" reboot.

Perhaps your $SB_RESTARTFLAG$ line is never executed?

Friedrich

NewsArchive
05-23-2014, 03:05 AM
BTW, I can send my demo project if you want.

Friedrich

NewsArchive
05-23-2014, 06:42 AM
Friedrich,

Does it matter where in my script I have this line - Set Installer Flag
$SB_RESTARTFLAG$ to "0"?

It is at the beginning of my script, before the running services are
stopped. Maybe I should put it after the services are stopped?

regards,

Chuck

NewsArchive
05-23-2014, 06:42 AM
Chuck,

> Does it matter where in my script I have this line - Set Installer Flag
> $SB_RESTARTFLAG$ to "0"?

Yes !!!

> It is at the beginning of my script, before the running services are
> stopped. Maybe I should put it after the services are stopped?

The 'Set Installer Flag $SB_RESTARTFLAG$ to "0"' function overwrites the
status of the reboot. I would suggest to use it at the end of the project.

BTW, please note that without the reboot (if you overwrite a locked/in-use
file), you have an incomplete installation!

Friedrich

NewsArchive
05-23-2014, 11:20 AM
Friedrich,

Thanks - after some thought it occurred to me that 'Set Installer Flag
$SB_RESTARTFLAG$ to "0"' MUST be at the end of my script - a slap-myself
moment.

Also, what is the significance/result/meaning of an "incomplete
installation"? Does Windows not like this? What are the ramifications?

regards,

Chuck

NewsArchive
05-23-2014, 11:21 AM
Chuck,

> Thanks - after some thought it occurred to me that 'Set Installer Flag
> $SB_RESTARTFLAG$ to "0"' MUST be at the end of my script - a slap-myself
> moment.

<G>

> Also, what is the significance/result/meaning of an "incomplete
> installation"? Does Windows not like this? What are the ramifications?

As I understand it, your service did not shut down and as a result the
service files (including all dependencies) are in-use/locked. Windows has
to replace the files after the next reboot. Without the required reboot,
the files are out-of-sync (this might cause a support nightmare sooner or
later).

If I were you, I would not continue with the "real" installation process if
the service does not shut down. You can check for an active service in a
simple LOOP, give the service some time to shut down, check again, etc.

You had the same problem in the past:

http://www.lindersoft.com/forums/showthread.php?p=75843#post75843

Here is a very good example:

http://www.lindersoft.com/forums/showthread.php?p=74025#post74025

Friedrich

NewsArchive
05-23-2014, 11:21 AM
And if you need help with the Check Running Service / Stop Service / LOOP /
Check Running Service / Restart Service, just let me know.

Friedrich