vasu_sankaran

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: System Restore #50968

    RESOLVED
    =======

    I figured out the missing piece and felt that this information may be of value to others.

    The CLSID registry entry for srwmi.dll required for COM was missing. I found and exported this key from my Windows 7 box, and now I can invoke System Restore functions from WMI scripts (indeed, as far as I can tell, the only way to actually trigger a system restore is through WMI). The reg key to import is HKLMSOFTWAREClassesCLSID{a47401f6-a8a6-40ea-9c29-b8f6026c98b8}.

    Vasu

    in reply to: System Restore #50970

    UPDATE

    Following some information I found online, I was able to get one step further by copying sr.mof file from a Windows 7 machine to C:WindowsSystem32wbem directory, and compiling it with mofcomp.exe. I got one step further, but now I am getting a 80041013 Provider load failure for SystemRestore WMI provider.

    Any ideas?

    in reply to: System Restore #50969

    Thanks for a great post! I have a question pertaining to WMI for System Restore. I wrote the following simple script for creating a restore point and verified that it works on a true Windows 7 machine.

    +++++++++
    strComputer = “.”
    Set objWMIService = GetObject(“winmgmts:\” & strComputer & “rootdefault”)
    Set obj = objWMIService.Get(“SystemRestore”)

    If (obj.CreateRestorePoint(“Scripted”, 12, 100)) = 0 Then
    wscript.Echo “Success”
    Else
    wscript.Echo “Failed”
    End If
    +++++++++

    But after installing your package on a Win 2008 R2, the script fails because “SystemRestore” WMI class is missing. Do you have any suggestions? I see that your package includes srwmi.dll. I also tried copying sr.mof and sr.mfl files, but that did not help.

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)