Save and backup the Registry

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Ianw
Junior Coder
Posts: 26
Joined: Mon Jan 29, 2007 8:37 pm
Location: UK

Save and backup the Registry

Post by Ianw » Thu Aug 06, 2009 11:05 am

When I was doing a search this morning for the lottery macro I came across the macro to make a registry backup and another to restore the registry.

Would you check these please for any "faults" in them.
The backup macro works OK, or so it seems to as I get the .reg file.

What I'm really apprehensive about is the restore Registry in case it may not be correct and my registry may cause a serious problem.

Many thanks for a great macro and I'm sorry to bother you.

______________________________________________________
To Backup the Registry

rem>
Run>cmd.exe /c regedit /E e:\Configs\Registry\HKCU_BAK.REG HKEY_CURRENT_USER
Wait>3
Run>cmd.exe /c regedit /E e:\Configs\Registry\HKCU_BAK1.REG HKEY_CLASSES_ROOT
Wait>3
Run>cmd.exe /c regedit /E e:\Configs\Registry\HKCU_BAK2.REG HKEY_LOCAL_MACHINE
Wait>3
Run>cmd.exe /c regedit /E e:\Configs\Registry\HKCU_BAK3.REG HKEY_USERS
Wait>3
Run>cmd.exe /c regedit /E e:\Configs\Registry\HKCU_BAK4.REG HKEY_CURRENT_CONFIG
Wait>3

-----------------------------------------------
To Restore the Regstry

REM>
Run Program>regedit.exe e:\Configs\Registry\HKCU_BAK.REG
Wait>1
WaitWindowOpen>Registry Editor
Wait>1
SetFocus>Registry Editor
Wait>1
Press ALT
Wait>1
Press F4
Wait>1
Release ALT
Wait>1
Many thanks
Ianw

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Aug 17, 2009 7:47 am

It will be fine. That code just uses Regedit to create a reg file, which can be imported back into the registry using regedit.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts