EN RU
Log in
Home
Download
Purchase
Documentation
Support
Contact us
 
Help  /  Problem solving

How to create a recovery point

CreateInstall does not have a special command to create a restore point during the installation process. You can use the .vbs script for this purpose.


'Unattended System Restore Point
'sysrestorepoint.vbs
'c Doug Knox - rev 02/11/2002
'Downloaded from www.dougknox.com 
'Extracted from original code by Bill James - www.billsway.com

Set sr = getobject("winmgmts:\\.\root\default:Systemrestore")

msg = "Restore Point has been created"

'Put a ' in front of the next five lines to disable the Success Failed Prompt.
If (sr.createrestorepoint(msg, 0, 100)) = 0 Then
    ' MsgBox msg
Else
    ' MsgBox "Restore Point creation Failed!"
End If

'Remove the ' from the next 3 lines to only alert you if the process failed
'If (sr.createrestorepoint("Automatic Restore Point", 0, 100)) <> 0 Then
'    MsgBox "Restore Point creation Failed!"
'End If

Create a .vbs file and copy the code there. Include this file in your installation.

Unpack this script into a directory and run it with the Run JavaScript & VBScript command.

Eonza automation software - free, open source cross-platform program for easy creation and management of scripts.
  • Help
    • Introduction
    • Get to know CreateInstall
    • Compare installers
    • License Agreement
    • License Light
    • License Free
    • Program features
    • Command Reference
    • FAQ
    • Examples & tips
    • CreateInstall Assistant
    • Problem solving
      • Cannot add resource file
      • How to install font
      • Language resources
      • Registry redirect
      • Superposition of variables
      • Creating a restore point
    • Setup Extractor
Copyright © Novostrim, OOO, 2009-2026 All rights reserved.