how to make backup from regedit by cmd?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mohammad_Dos
Posts: 84
Joined: 08 Sep 2010 10:25
Location: Iran,Kashan
Contact:

how to make backup from regedit by cmd?

#1 Post by Mohammad_Dos » 10 Jul 2011 04:25

Hello friends
how to make backup from regedit by cmd?

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: how to make backup from regedit by cmd?

#2 Post by aGerman » 10 Jul 2011 05:44

Code: Select all

regedit /e "%userprofile%\desktop\all.reg"


This creates all.reg on your desktop. Note, it needs a lot of time (probably longer than a minute). The file is big enough that an editor will have problems to open it.

Regards
aGerman

Mohammad_Dos
Posts: 84
Joined: 08 Sep 2010 10:25
Location: Iran,Kashan
Contact:

Re: how to make backup from regedit by cmd?

#3 Post by Mohammad_Dos » 10 Jul 2011 10:02

thank u
1-
but what about when i want to backup just a part of registry? for example:
HKEY_CURRENT_CONFIG\Software




2-
is it possible to get backup from regedit in a bat file?

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: how to make backup from regedit by cmd?

#4 Post by aGerman » 10 Jul 2011 11:07

1-

Code: Select all

regedit /e "%userprofile%\desktop\HCCSW.reg" "HKEY_CURRENT_CONFIG\Software"


2-
I don't get it. You can write the command line into a batch file.
To import a .reg file into your registry use

Code: Select all

regedit /s "%userprofile%\desktop\HCCSW.reg"


But it makes no sense to export registry keys into a .bat file, because the result is not a batch code.

Regards
aGerman

Mohammad_Dos
Posts: 84
Joined: 08 Sep 2010 10:25
Location: Iran,Kashan
Contact:

Re: how to make backup from regedit by cmd?

#5 Post by Mohammad_Dos » 10 Jul 2011 12:35

THANK U

Post Reply