I use this handy script to do a 'set Restore Point' on XP SP3.
Used it for a good long time.
Code:
#NoEnv
#Include Library\CoHelper.ahk
CoInitialize()
InputBox,astr,Create Restore Point,Please enter a short Restore Point description`nFor example - 'About to install XYZ product'
if ErrorLevel
{
EXITApp
}
WinSet,AlwaysOnTop,ON,Create Restore
Splashtexton,350,50,Create Restore Point, Working...`nThis shouldn't take more than a minute.
Namespace := "root\default"
Class := "SystemRestore"
Method := "CreateRestorePoint"
RpDesc := "Description"
RpType := "RestorePointType"
EvType := "EventType"
Ansi2Unicode(Method, wMethod)
Ansi2Unicode(RpDesc, wRpDesc)
Ansi2Unicode(RpType, wRpType)
Ansi2Unicode(EvType, wEvType)
pDesc := SysAllocString(astr) ; Replace the text as liked
pcls := GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\" . Namespace . ":" . Class)
DllCall(VTable(pcls, 28), "Uint", pcls, "UintP", pset) ; Methods_
DllCall(VTable(pset, 8), "Uint", pset, "str", wMethod, "int", 0, "UintP", pmth) ; Item
DllCall(VTable(pmth, 9), "Uint", pmth, "UintP", pins) ; InParameters
DllCall(VTable(pins, 27), "Uint", pins, "UintP", ppro) ; Properties_
VarSetCapacity(var, 8 * 2, 0)
EncodeInteger(&var + 0, 8)
EncodeInteger(&var + 8, pDesc)
DllCall(VTable(ppro, 8), "Uint", ppro, "str", wRpDesc, "int", 0, "UintP", pitm) ; Item
DllCall(VTable(pitm, 8), "Uint", pitm, "Uint", &var) ; Value
Release(pitm)
EncodeInteger(&var + 0, 3)
EncodeInteger(&var + 8, 0)
DllCall(VTable(ppro, 8), "Uint", ppro, "str", wRpType, "int", 0, "UintP", pitm) ; Item
DllCall(VTable(pitm, 8), "Uint", pitm, "Uint", &var) ; Value
Release(pitm)
EncodeInteger(&var + 8, 100)
DllCall(VTable(ppro, 8), "Uint", ppro, "str", wEvType, "int", 0, "UintP", pitm) ; Item
DllCall(VTable(pitm, 8), "Uint", pitm, "Uint", &var) ; Value
Release(pitm)
hResult := DllCall(VTable(pcls, 19), "Uint", pcls, "str", wMethod, "Uint", pins, "int", 0, "Uint", 0, "UintP", pout) ; ExecMethod_
Release(ppro)
Release(pout)
Release(pins)
Release(pmth)
Release(pset)
Release(pcls)
SysFreeString(pDesc)
CoUninitialize()
SplashTextOff
IFequal,hResult,0
{
Msgbox,,Create Restore Point,Your System Restore point has been created successfully.`nPress OK to finish.
} else
{
MsgBox,,Create Restore Point,PROBLEM: Restore was NOT successful: Result = %hResult%. Probably free disk space is too low or fragmented.
}
Can we assume you've switched on 'System Restore' via the System Properties and you are logged in as a Full Administrator?