Hello wise monks, I am seeking guidance on a problem. I am attempting to create a System Restore point on a Windows 7 machine, and I cannot tell if the code I am using is as faulty as my intellect or if it is the machine that is the problem. Code posted below
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);
print "$test";
Update: no actual updates, still just returning undef
I have a sneaking suspicion that even if the snippet above is perfect I still have environmental issues, however before I go and build another machine to test are there any obvious errors? The connection to WMI succeeds, but the return from CreateRestorePoint is undef. The documentation I am working from is located here: http://support.microsoft.com/kb/295299
Thank you!