PerlBear has asked for the wisdom of the Perl Monks concerning the following question:
This is what I would call it's "countermeasure" (in case you want to abort a reboot that is about to occur:#!/usr/bin/perl -w use Win32; Win32::InitiateSystemShutdown( '', "\nWARNING\!\!\n\nSystem is about t +o Reboot\!\n\(The system will reboot in 30 seconds.\)", 30, 1, 1 );
I want to create something simliar to the first script shown above except it simply puts the computer in standby or sleep mode. I did a little digging but didn't find anything that was quite obvious right off the bat. Perhaps, maybe this falls into the realm of Windows Scripting, which I am not all that familiar with, but I am willing to adapt; hoping for a perl solution. Any help/insight that can be provided will great!#!/usr/bin/perl -w use Win32; $machineName=""; Win32::AbortSystemShutdown($machineName);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need Advice On Script to Automate Windows Standby
by BrowserUk (Patriarch) on Aug 30, 2005 at 18:02 UTC | |
|
Re: Need Advice On Script to Automate Windows Standby
by PerlBear (Hermit) on Aug 31, 2005 at 12:36 UTC | |
by Anonymous Monk on Nov 21, 2012 at 05:14 UTC | |
by Anonymous Monk on Nov 21, 2012 at 09:34 UTC |