Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Windows OLE in Perl, System Restore

by BrowserUk (Pope)
on Feb 06, 2013 at 16:28 UTC ( #1017466=note: print w/ replies, xml ) Need Help??


in reply to Windows OLE in Perl, System Restore

the return from CreateRestorePoint is undef.

What do you get if you print $^E? eg.:

use strict; use Win32::OLE('in'); use constant wbemFlagReturnImmediately => 0x10; use constant wbemFlagForwardOnly => 0x20; my $res = Win32::OLE->GetObject("winmgmts:\\\\.\\root\\default:Systemr +estore") or warn "WMI connection failed.\n"; my $test = $res->CreateRestorePoint("New Restore Point", 0, 100) or die "CRP failed with: $^E"; print "$test";

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Windows OLE in Perl, System Restore
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017466]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-19 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls