Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Shutdown instead of Reboot


1 reply to this topic

80LPJ

80LPJ
  • Members
  • 22 posts

Posted 12 July 2001 - 18:34

Hi all,

At the end of my installation, the user is prompted to restart his/her computer.  I was able to make this happen by using the ScheduleReboot action.  

There is one case where I want my user to shutdown so he/she can install a required hardware to use my application. In this case, the user installs the software first, then the hardware second (PCI device).

Currently, if my installer does not detect my hardware device, I instruct the user to finish the installation, choose no when the user gets prompted to restart the computer.  The user then has to manually shutdown the computer  to install the device.

Is there a method/action in ISWI  to prompt the user to shutdown the computer automatically?

Or,  does anyone know which windows dll call  prompts the user to shutdown his/her computer?

Thanks,

80LPJ
ISWI User


Tsetso

Tsetso
  • Members
  • 2 posts

Posted 17 October 2001 - 13:47

Try the following command line :

rundll32.exe user.exe,ExitWindows

this will Shut Down the computer,

or

Use Windows API function:

ExitWindowsEx par1, par2

par1 :
0 - logoff
1 - shutdown
2 - reboot
4 - force reboot
8 - shut down and power off

par2 - ignored, 0 for example

this function is declared in user32.dll