SMR's Registry Backup Tool

Discussion in 'Help & Requests' started by Govind, Oct 12, 2010.

SMR's Registry Backup Tool
  1. Unread #1 - Oct 12, 2010 at 1:55 PM
  2. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    SMR's Registry Backup Tool

    Works with: Windows Vista and Windows 7.

    Usage: Makes back ups of your HKEY_LOCAL_MACHINE hive by creating copies of the physical files where the contents of that key are stored.

    Cannot be used while Windows is running. You will need to use this in the Command Prompt from the "Repair your computer" option from your Vista/7 install DVD, or if your F8 menu has a "Repair your computer..." option, courtesy of your OEM (press F8 while starting).

    Copy this file into C:\Windows\system32\config\BackupRegistry.vbs. You can run this on a non-running Windows installation to make backups of your registry periodically.

    If you choose to restore one of the backups you make, go into Windows Recovery Environment, navigate to the folder using Command Prompt, and run the file restore.vbs in that folder.

    Code:
    ' Registry Backup Tool
    ' For use in Windows Recovery Environment
    ' Made by SMR (Govind Parmar) (C) 2010
    Option Explicit
    Dim oRegEx, oFSys, datetimeStr, outFile, outContents
    Set oRegEx = CreateObject("VBScript.RegExp")
    Set oFSys = CreateObject("Scripting.FileSystemObject")
    oRegEx.Global = True
    oRegEx.Pattern = "[^0-9]"
    datetimeStr = oRegEx.Replace(Date() & Time(), Empty)
    oFSys.CreateFolder("Backup_" & datetimeStr)
    oFSys.CopyFile "SYSTEM", "Backup_" & datetimeStr & "\SYSTEM"
    oFSys.CopyFile "SOFTWARE", "Backup_" & datetimeStr & "\SOFTWARE"
    oFSys.CopyFile "DEFAULT", "Backup_" & datetimeStr & "\DEFAULT"
    oFSys.CopyFile "COMPONENTS", "Backup_" & datetimeStr & "\COMPONENTS"
    outContents = _
    "Option Explicit" & vbCrLf & _
    "Dim oRegEx, oFSys, datetimeStr" & vbCrLf & _
    "Set oRegEx = CreateObject(" & Chr(34) & "VBScript.RegExp" & Chr(34) & ")" & vbCrLf & _
    "oRegEx.Global = True" & vbCrLf & _
    "oRegEx.Pattern = " & Chr(34) & "[^0-9]" & Chr(34) & vbCrLf & _
    "datetimeStr = oRegEx.Replace(Date() & Time(), Empty)" & vbCrLf & _
    "Set oFSys = CreateObject(" & Chr(34) & "Scripting.FileSystemObject" & Chr(34) & ")" & vbCrLf & _
    "oFSys.MoveFile " & Chr(34) & "..\SYSTEM" & Chr(34) & ", " & Chr(34) & "..\SYSTEM.BAK." & Chr(34) & " & datetimeStr" & vbCrLf & _
    "oFSys.MoveFile " & Chr(34) & "..\SOFTWARE" & Chr(34) & ", " &  Chr(34) & "..\SOFTWARE.BAK." & Chr(34) & " & datetimeStr" & vbCrLf & _
    "oFSys.MoveFile " & Chr(34) & "..\DEFAULT" & Chr(34) & ", " &  Chr(34) & "..\DEFAULT.BAK." & Chr(34) & " & datetimeStr" & vbCrLf & _
    "oFSys.MoveFile " & Chr(34) & "..\COMPONENTS" & Chr(34) & ", " &  Chr(34) & "..\COMPONENTS.BAK." & Chr(34) & " & datetimeStr" & vbCrLf & _
    "OFSys.MoveFile" & Chr(34) & "SYSTEM" & Chr(34) & ", " & Chr(34) & "..\SYSTEM" & Chr(34) & vbCrLf & _
    "OFSys.MoveFile" & Chr(34) & "SOFTWARE" & Chr(34) & ", " & Chr(34) & "..\SOFTWARE" & Chr(34) & vbCrLf & _
    "OFSys.MoveFile" & Chr(34) & "DEFAULT" & Chr(34) & ", " & Chr(34) & "..\DEFAULT" & Chr(34) & vbCrLf & _
    "OFSys.MoveFile" & Chr(34) & "COMPONENTS" & Chr(34) & ", " & Chr(34) & "..\COMPONENTS" & Chr(34) & vbCrLf & _
    "WScript.Echo " & Chr(34) & "Current COMPONENTS, DEFAULT, SOFTWARE, and SYSTEM hives backed up as *.BAK." & Chr(34) & " & datetimeStr" & vbCrLf
    Set outFile = oFSys.CreateTextFile("Backup_" & datetimeStr & "\restore.vbs")
    outFile.WriteLine(outContents)
    WScript.Echo "Backup of current COMPONENTS, DEFAULT, SOFTWARE, and SYSTEM hives created in folder Backup_" & datetimeStr & "." & vbCrLf & "Use the file Backup_" & datetimeStr & "\restore.vbs while in Windows Recovery Environment to restore this backup."
     
  3. Unread #2 - Oct 13, 2010 at 8:57 PM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    SMR's Registry Backup Tool

    Wouldn't it be easier just to export the actual registry keys...?
     
  5. Unread #3 - Oct 16, 2010 at 9:29 AM
  6. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    SMR's Registry Backup Tool

    In the case that Windows becomes unbootable due to a registry problem, you can't access the registry of an offline Windows installation through regedit in WinRE.
     
< Ubuntu and Landline Phone Problem | Flipping Alertpay... >

Users viewing this thread
1 guest


 
 
Adblock breaks this site