PDA

View Full Version : Reboot Computer System and Resume



NewsArchive
04-14-2011, 12:51 AM
Using the Sql2008 installer, I noticed that there is a section at the end as
follows:

If %SQL2008EXPR_RETURNCODE% Equals "3010" Then
Reboot Computer System and Resume
End


I understand the 3010 means that Microsoft requires this reboot, and that
the Reboot/Resume should take care of this.

Couple of questions:
1. Will the installer be started automatically when reboot is complete?
and if so, will it be after the user logs in? and does it need to be the
same user?

2. If user is not Admin, only logs out. Does that mean that the
SysAdmin needs to reboot the server, and then the "installing" user log back
in to continue?

3. Do I need to check %_SB_RESUME% in my code and tell it to "skip these
parts" or is this handled automatically by SB?

4. Is there a way to set things up so this will hit (so I can test this
condition)?

5. Any other concerns I need to consider for this condition?

Thanks for your help.
--Glenn.

NewsArchive
04-14-2011, 12:52 AM
Hi Glenn,

> Couple of questions:

Good questions.

> 1. Will the installer be started automatically when reboot is complete?
> and if so, will it be after the user logs in? and does it need to be the
> same user?

The "restart" entries are executed the next time the computer is restarted
and a user logs on to the system (if system logon is applicable).

> 2. If user is not Admin, only logs out. Does that mean that the
> SysAdmin needs to reboot the server, and then the "installing" user log
> back in to continue?

In this case, Windows does not execute the RegistryRunOnce item and so a
simple login/logout is not enough.

> 3. Do I need to check %_SB_RESUME% in my code and tell it to "skip
> these parts" or is this handled automatically by SB?

The installer is restarted after the reboot. You have to add your own
script logic to "skip" already processes script lines.

> 4. Is there a way to set things up so this will hit (so I can test this
> condition)?

Yes, you can set the %_SB_RESUME% variable via the command line to test this
condition.

For example:

setup.exe /V _SB_RESUME 1

>
> 5. Any other concerns I need to consider for this condition?
>

No, not that I am aware of.

Friedrich

NewsArchive
04-14-2011, 12:53 AM
So, if I hit the "reboot" code at the end of the SQL2008 install, does that
mean SQL WAS or WAS NOT installed?
in other words, do I need my "continue install" code to begin before or
after SQL install .sbi?

Also, on Q2 below, I need to instruct the user to shut down his machine, and
then log back in, right? and then the "restart" entries will be processed,
even if the user is not admin?

Thanks,
-Glenn.

NewsArchive
04-14-2011, 12:53 AM
Hi Glenn,

> So, if I hit the "reboot" code at the end of the SQL2008 install, does
> that mean SQL WAS or WAS NOT installed?
> in other words, do I need my "continue install" code to begin before or
> after SQL install .sbi?

If the return code was "3010" then the Microsoft redistributable returned
this code. That means, the redistributable installed fine, but it needs a
reboot to complete the (SQL) redistribution.

So you can continue after the SQL .sbi. But even if you continue before it,
the .sbi detects that SQL is installed and will not execute again.

> Also, on Q2 below, I need to instruct the user to shut down his machine,
> and then log back in, right? and then the "restart" entries will be
> processed, even if the user is not admin?

The SQL install itself requires administrator privileges. I don't think
that a non-admin can run (or continue) your install.

Friedrich

NewsArchive
04-14-2011, 12:54 AM
All good. Writing my code.
I need the original %_SB_INSTALLDIR% when I come back in. Don't want to
prompt the user for it again.
What would be the proper way to do this?

I tought about writing it to the registry, or saving an .ini file somewhere,
neither of these options seem "proper"...

I defer to your mighty wisdom, oh Sir Friedrich.

Thanks,
--Glenn.

NewsArchive
04-14-2011, 12:54 AM
Glenn,

> All good. Writing my code.
> I need the original %_SB_INSTALLDIR% when I come back in. Don't want to
> prompt the user for it again.
> What would be the proper way to do this?
>
> I tought about writing it to the registry, or saving an .ini file
> somewhere, neither of these options seem "proper"...
>
> I defer to your mighty wisdom, oh Sir Friedrich.

I assume you reboot after the user selected his install folder and after you
opened the uninstall logging.

By default, the following line in your script writes the installation
location to the Windows registry:

! Create installation .log
Create Installation App & Log "[UNINSTALL_LOG]"

So you only have to use the "Detect Previous Version..." script function
after the reboot to retrieve the original installation location.

Does this help?

Friedrich

NewsArchive
04-14-2011, 12:55 AM
The basics of reboot and resume are illustrated in the example file called
(wouldya believe?) "Reboot and Resume.sb7"

Jane Fleming

NewsArchive
04-14-2011, 12:56 AM
Jane,

This would be cool!
Where would one find this illusive "Reboot and Resume.sb7" example? (I do
like the name, btw.)
Is not on my hdd, and didn't appear to be attached.
I do have "senior moments". Perhaps this is one?

Thanks,
--Glenn.

NewsArchive
04-14-2011, 12:56 AM
Glenn,

Add the SB command "Reboot/Resume" to your script. For safety sake, I also add
"Set System Restore Point" before (doing it after is self-defeating <g>)

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
04-14-2011, 12:57 AM
Glenn,

If you haven't downloaded and installed the examples, you're doing yourself
a disservice.
Available here: http://www.setupbuilder.com/downloads_licensed.htm

The graphic I posted is from the "Learning SetupBuilder Part I" help file
that can also be downloaded from that page, or from within the SB IDE (pic).

Jane