VMware Cloud Community
AnonymousDefaul
Enthusiast
Enthusiast

Is Windows Restore Point creation supported by InstallBuilder?

Is Windows Restore Point creation supported by InstallBuilder?

Labels (1)
0 Kudos
1 Reply
AnonymousDefaul
Enthusiast
Enthusiast

There is no built-in action for performing it, but you can use VBScript to create a restore point.

The example below creates a random point with project's <fullName> as name of the restore point:

<writeFile>     <path>${system_temp_directory}/createrestore.vbs</path>     <text>Set SRP = GetObject( or ' winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore or ' )     Result = SRP.createrestorepoint ( or ' ${project.fullName} or ' , 0, 100)      If Result = 0 Then         Wscript.Exit 0     Else         Wscript.Exit 1     End If     </text> </writeFile> <runProgram>     <program>cscript</program>     <programArguments>/NOLOGO  or ' createrestore.vbs or ' </programArguments>     <workingDirectory>${system_temp_directory}</workingDirectory> </runProgram> <deleteFile>     <path>${system_temp_directory}/createrestore.vbs</path> </deleteFile> 

More information on using SystemRestore, its attributes and methods can be found on MSDN.

0 Kudos