The Shutdown Utilities are written by Paraglider
This plugin consists of these utilities:
Shutdown.exe - Shutdown / Reboot / Eject CDs Utility
PEGina.dll - Intercept shutdown dialog from explorer. This is enabled by starting explorer and and is for use by explorer plugins. If using XPE then the shutdown.inf file should be edited to stop the renaming of pegina.dll to msgina.dll on the copy. On XPE pegina.dll should be copied as pegina.dll so that it replaces the Sherpya pegina.dll ( this plugin must be applied after XPE ).Note it will still work if you don't do this change to the inf file on XPE - then the Sherpya pegina will call my msgina which will call the original msgina which is now named ginaorg. My GINA adds four additional entries to the standard MS shutdown dialog:
Shutdown / Eject
Reboot / Eject
Shutdown / Eject All
Reboot / Eject All
The Eject option is equivalent to /B plus /C below. The close timeout is assumed to be 5 seconds. The Eject All option is equivalent to the /E parameter.
The name of the renamed original GINA can be configured in the registry. The following sets the name to ginaorg.dll which is the default assumed name if this option is not specified in the registry:
Optionally the eject gui can be configured do be displayed when the extra added optons are selected. This is configured in the registry:
ShutdownP.exe - equivalent to Shutdown /P
ShutdownS.exe - equivalent to Shutdown /S
In addition foreign language DLLs are included to allow the strings in the utilities to be replaced with localized strings. These dlls are named ShutdownRes_XX.dll and which ever one is selected must be copied to the PE CD as ShutdownRes.dll. Currently only ShutdownRes_DE.dll ( German ) is available. The source for the english version of the resource file is included so anybody can build a localized version.
The Shutdown utility can take one or more of the following command line parameters:
- /EjectBootDrive or /B
Before shutting down or rebooting eject the boot CD. Use the /CloseBootDrive option if your bios does not automatically close the boot CD on reboot.
Close the boot drive. Some computer bioses do this automatically on a reboot. Others do not. This is for the ones that do not or if you wish to close the drawer on a shutdown.
Before shutting down or rebooting eject any CDs. Any none boot CDs will be ejected sequentially and closed prior to ejecting the boot CD. Use the /CloseBootDrive option if your bios does not automatically close the boot CD on reboot.
- /EjectGUI or /Eg
After ejecting a CD show a gui allowing the user to confirm that it is OK to continue with the shutdown process i.e. the media has been removed from the drawer and the drawer has been manually closed if required. Any timeout specified with the /T parameter or the /C parameter will be ignored if this parameter is specified.
Show the closedown gui from the msgina dll. By default ginaorg.dll is used assuming you are using the replacement msgina from these utilities. If you are not then use the /m parameter to specify the original dll name.
Minimize the auto timer dialog when it starts.
Show the initiate timer dialog which allows the timeout value ( either an absolute number of hours / minutes / seconds or a specific time ) to be selected and the action to perform on timer expiry. The timer will start when the enable timer button is selected. Before the timer expires the timer can be cancelled by selecting the cancel timer button.
- /I[nitiate] <Timeout>
Will initiate a closedown / restart after the specified timeout value. Whilst this timer is counting down a dialog will be shown with the time to close down being updated every second. If the cancel button is hit on this dialog prior to the time to close down time becoming zero then the close down will be cancelled.
The <Timeout> value can either be a number of seconds or an absolute time in the format hh:mm[:ss] . The :ss part of the absolute time is optional. The absolute time is specified in 24hr format thus 5PM is 17:00 . On display of the dialog if the absolute time is earlier than the current time then it will be assumed to represent a time tomorrow e.g. you can wait at most 24hrs.
The action taken when the timeout expires is selected with the other parameters e.g. restart in 60 seconds is "shutdown /i 60 /r".
There must be at least one space between the /I[nitiate] and the <Timeout>.
- /M[sgina] <DLLName>
Name of original msgina.dll used for showing the gui. If the original has been renamed to something other than ginaorg.dll or it has not been renamed and you are using the /g option then you must use this option to name the dll. There must be at least one space between /M[sgina] and <DLLName>. Thus if the msgina has not been renamed you must use "/M msgina.dll". If it had been renamed to pegina.dll you would specify "/m pegina.dll".
Powerdown the computer. This should not be used with /Shutdown.
- /R[eboot]T[imeout] <TimeoutValue>
Species the delay in milliseconds before rebooting after completing any other closedown actions like opening and closing media drawers. There must be at least one space between /R[eboot]T[imeout] and <TimeoutValue> .i.e.
/RT 5000or /RebootTimeout 5000. If the drawer is closed then this will be the delay after closing the drawer and before rebooting.
Reboot the computer. This should not be used with /Shutdown.
Shutdown the computer. This should not be used with /reboot.
- /T[Timeout] <TimeoutValue>
Specifies the delay in milliseconds between opening the CD drawer and closing it. If this is not specified then it defaults to 5000 ( 5 seconds ). There must be at least one space between /T[imeout] and <TimeoutValue>.
When the dialog is minimized then minimize to the taskbar tray instead of the taskbar.
- Use this option if your system fails to shutdown after ejecting the boot drive when using the shutdown.exe program and you are using an explorer plugin. This option requests that explorer is used to perform the eject / shutdown.