Jump to content

Backup and Restore Registry Key


 Share

Recommended Posts

What is the command to backup and restore a registry key?

Here's a Bat file I use for Outlook Client, how can I port this to AutoIt

@echo off

rem *********************************************************************

rem VERSION 1.0 (Walter Torres)

rem *********************************************************************

echo Processing Arguments...

set BACKUP_DIR=.

set OPERATION=Backup

if %OS%a==a goto OS_9x

:OS_NT

goto argLoop

:argLoop

if "%1"=="/d" goto setDir

if "%1"=="/b" goto setBackup

if "%1"=="/r" goto setRestore

if "%1"=="" goto begin

goto usage

:setDir

set BACKUP_DIR=%2

shift

shift

goto argLoop

:setBackup

set OPERATION=Backup

shift

goto argLoop

:begin

echo Operation: %OPERATION%

echo Backup dir: %BACKUP_DIR%

rem pause

goto do%OPERATION%

goto end

:doBackup

if not %BACKUP_DIR% == . mkdir "%BACKUP_DIR%"

mkdir "%BACKUP_DIR%\Outlook Client"

regedit /e "%BACKUP_DIR%\Outlook Client\outlook.reg" "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"

goto end

:end

set BACKUP_DIR=

set OPERATION=

rem set LSAD=

rem set AD=

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...