PDA

View Full Version : How to reboot W2K with Install Script



jareedy
04-23-2004, 09:37 AM
I have very limited experience with Developer. We've been using it mostly to create simple packages to upgrade device drivers, etc on W2K Advanced Server.

We are using Developer 7.0 with Service Pack 4. The target system is Windows 2000 Advanced Server.

I was trying to use my Install Script to allow a reboot of the system at the end of the install. I have tried RebootDialog,
System(SYS_BOOTMACHINE), and SdFinishReboot - but none of them seem to work. No reboot occurs.

Is there something wrong with these commands, or is there some other action/option I need to use to make them work? What is a quick and simple way I can allow the user to select a reboot at the end of the install?

Thanks.

Jeff Reedy
IBM
Research Triangle Park, NC

oliverb
04-28-2004, 07:42 AM
Jeff,

You can schedule a reboot by doing the following:

1.
[If your project is a Basic MSI]
Go to the 'Customize Functionality' section (#5) and select 'Sequences'.
[If your project is a Standard Project]
Go to the 'Advanced Views' section (last one at the bottom) and select 'Sequences'.

2. Open the 'Installation' leaf and select the 'Execute' sequence.

3. Towards the bottom, you will see the 'ScheduleReboot' action. Select it and add the following to the Condition field (located to the right-top of your screen):

ISSCHEDULEREBOOT Or (Version = 400 And Not Installed)

This will ensure that you only reboot if installing to a WIN2K machine and ONLY when first installing the application. Otherwise, if you want the installation to reboot during uninstall as well, omit the 'And Not Installed' portion of the condition above.

Good Luck..!