Dismas has asked for the wisdom of the Perl Monks concerning the following question:
#!perl # The following example reads and displays the value in the DWORD regi +stry value # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\Aut +oReboot. use Win32::OLE; use constant HKEY_LOCAL_MACHINE => 0x80000002; my $dwValue = 42; $strComputer = '.'; $oReg = Win32::OLE->GetObject('winmgmts:{impersonationLevel=impersonat +e}!\\\\' . $strComputer . '\\root\\default:StdRegProv'); $strKeyPath = 'SYSTEM\\CurrentControlSet\\Control\\CrashControl'; $strValueName = 'AutoReboot'; $oReg->GetDWORDValue(HKEY_LOCAL_MACHINE, $strKeyPath, $strValueName, $ +dwValue); print 'AutoReboot' . ' == ' . $dwValue, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Value Sought from Subroutine Argument?
by friedo (Prior) on Mar 02, 2005 at 15:23 UTC | |
by Dismas (Acolyte) on Mar 02, 2005 at 15:35 UTC | |
|
Re: Value Sought from Subroutine Argument?
by dragonchild (Archbishop) on Mar 02, 2005 at 15:43 UTC | |
by Dismas (Acolyte) on Mar 02, 2005 at 16:15 UTC | |
|
Re: Value Sought from Subroutine Argument?
by PodMaster (Abbot) on Mar 03, 2005 at 07:54 UTC | |
|
Re: Value Sought from Subroutine Argument?
by ikegami (Patriarch) on Mar 02, 2005 at 18:03 UTC |