Tim,

I have had mixed success using Win32::InitiateSystemShutdown, it didn't work
effectivley for mixed service packs therefore I used SHUTDOWN.EXE from the Winnt
Res Kit which has several options:

Usage: SHUTDOWN [/?] [\\Computer] [/L] [/A] [/R] [/T:xx] ["Msg"] [/Y] [/C]

/?        Shows this screen.
\\Computer     Specifies a remote computer to shutdown.
/L        Specifies a local shutdown.
/A        Abortes a systemshutdown. This is only possible during the
          timeout period.If this switch is used, all other are ignored.
/R        Specifies that the machine should reboot after shutdown.
/T:xx          Sets the timer for system shutdown in seconds.[20 sec. default]
"Msg"          Specifies an additional message
/Y        Answer all following questinons with yes
/C        Forces running applications to close.
          ATTENTION: If you use the /C parameter NT ignores the
                     applications option to save data which may
                     have changed. You will see no File-Save dialog
                     box, because NT will force the application to
                     close. This will result in a loss of all data.
                     not previously saved !!!

$shutdown="C:\\SHUTDOWN.EXE /L /R /T:01 /Y /C";
`$shutdown`;





|--------+------------------------------------------------>
|        |                                                |
|        |                                                |
|        |   [EMAIL PROTECTED]                    |
|        |   Sent by:                                     |
|        |   [EMAIL PROTECTED]|
|        |   net                                          |
|        |                                                |
|        |   22 May 2001 09:18 AM                         |
|        |   Please respond to perl-win32-gui-users       |
|        |                                                |
|--------+------------------------------------------------>
  >----------------------------------------------------------------------------|
  |                                                                            |
  |       To:     perl-win32-gui-users@lists.sourceforge.net                   |
  |       cc:                                                                  |
  |       Subject:     Re: [perl-win32-gui-users] Shutdown, reboot, logoff and |
  |       lock on NT and 2000 with perl?                                       |
  >----------------------------------------------------------------------------|





Tim,

The Win32 module has

     Win32::InitiateSystemShutdown(MACHINE, MESSAGE, TIMEOUT, FORCECLOSE,
REBOOT)

I haven't come across modules which do  of the other things.

Kev.




"Thomas, Timothy B" <[EMAIL PROTECTED]>@lists.sourceforge.net on
21/05/2001 23:20:02

Please respond to perl-win32-gui-users@lists.sourceforge.net

Sent by:  [EMAIL PROTECTED]


To:   "'perl-win32-gui-users@lists.sourceforge.net'"
      <perl-win32-gui-users@lists.sourceforge.net>
cc:

Subject:  [perl-win32-gui-users] Shutdown, reboot, logoff and lock on NT
      and 2000 with perl?


Are there any Win32::GUI options to to shutdown, reboot, logoff the current
user and/or lock the screen using perl on NT or 2000?

Thanks,
     Tim Thomas

_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




The information in this e-mail and any attachments is confidential and may be
legally privileged. It is intended solely for the addressee or addressees. If
you are not an intended recipient, please delete the message and any attachments
and notify the sender of misdelivery: any use or disclosure of the contents of
either is unauthorised and may be unlawful. All liability for viruses is
excluded to the fullest extent permitted by law. Any views expressed in this
message are those of the individual sender, except where the sender states them,
with requisite authority, to be those of a specific LAZARD company or
partnership.



Reply via email to