Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: backup registry in command line

04 Dec 2012   #1
bob363

windows 7 home premium 64 bit
 
 
backup registry in command line

Hello
I am trying to back up a registry key, I am using the command >reg export hkey_local_machine\software\microsoft\windows c:\windows\regbackup
and I keep getting the error message Unable to write to the file. There may be a disk or file system error. Not sure what I am doing wrong, any help would be appreciated


My System SpecsSystem Spec
.
04 Dec 2012   #2
Night Hawk

W7 Ultimate x64/W10 Pro x64 dual boot main build-remote pc W10 Pro x64 Insider Preview/W7 Pro x64
 
 

You may be entering the command wrong?! A simple type error in the command will cause an immediate problem. One guide with a chart for all the commands available can be looked over at Managing the Windows XP, Vista, and Windows 7 Registry from the Command Prompt with Reg.exe

If you still don't get anywhere using the command prompt method then refer to the SF guide for simply backing up the registry noting Method Two for seeing a backup exported. Registry - Backup and Restore
My System SpecsSystem Spec
05 Dec 2012   #3
Ztruker

Windows 10 Pro X64
 
 

The problem may be that you are trying to create the file in the Windows directory. Try a different location, like

reg export hkey_local_machine\software\microsoft\windows %userprofile%\regbackup

worked for me.

BTW: It's also a good idea to enclose both parameters in double quotes like this:

reg export "hkey_local_machine\software\microsoft\windows" "%userprofile%\regbackup"
My System SpecsSystem Spec
.

06 Dec 2012   #4
bob363

windows 7 home premium 64 bit
 
 

thanks for responding i know the command is correct because I am not getting a syntax error, I have tried creating different folders in different locations and I get the same error every time
My System SpecsSystem Spec
06 Dec 2012   #5
alan10

Windows 7 Ultimate 64 bit SP1 x64
 
 

Quote   Quote: Originally Posted by bob363 View Post
thanks for responding i know the command is correct because I am not getting a syntax error, I have tried creating different folders in different locations and I get the same error every time
Your knowledge may be incorrect - otherwise the command would work.

Perhaps your problem is that you do not have adequate authority.
If you are not allowed to create "different folders in different locations" then you are unlikely to create files.
My System SpecsSystem Spec
06 Dec 2012   #6
Night Hawk

W7 Ultimate x64/W10 Pro x64 dual boot main build-remote pc W10 Pro x64 Insider Preview/W7 Pro x64
 
 

Are you logged in as adminstrator or need to elevate permissions at all? You still have the other option available by following the guide there if you continue to run into problems as far as seeing a backup made.
My System SpecsSystem Spec
07 Dec 2012   #7
Ztruker

Windows 10 Pro X64
 
 

Did you try what I suggested?
My System SpecsSystem Spec
07 Dec 2012   #8
bob363

windows 7 home premium 64 bit
 
 

yes I posted above that I tried creating a folder in a different location and also tried using quotes but am still getting error, thanks for your help I appreciate it, I also tried running as administrator but that did not work either
My System SpecsSystem Spec
07 Dec 2012   #9
Night Hawk

W7 Ultimate x64/W10 Pro x64 dual boot main build-remote pc W10 Pro x64 Insider Preview/W7 Pro x64
 
 

Have you tried following the guide at all just for having a backup? If you still have problems using a gui approach you could be looking at some other problem since this could registry related.
My System SpecsSystem Spec
08 Dec 2012   #10
Ztruker

Windows 10 Pro X64
 
 

What happens if you try to create the file in the current directory?

reg export "hkey_local_machine\software\microsoft\windows" "regbackup"

Can you create a file from the Command Prompt at all? Try this:

echo "This is a test" > test.txt
My System SpecsSystem Spec
Reply

 backup registry in command line




Thread Tools




Similar help and support threads
Thread Forum
Registry : How to add extension keys through command line
I am looking for some help: I wish to add a new extension key of type .dns If I execute : reg add HKEY_CLASSES_ROOT\.dns Then the key .dns does not get added to HKEY_CLASSES_ROOT but somewhere in HKEY_CURRENT_USER ? How do I get the command to add the .dns key to HKEY_CLASSES_ROOT ?...
General Discussion
add folders in indexing options using registry or command line?
Hello, I'm trying to add folders in the indexing options by using either registry or command lines. This is for an unattended silent install. Any ideas ? Thanks.
Performance & Maintenance
How can I set this via command-line or registry?
How can I set this via command-line or registry? I need a way to automatically launch "Explorer c:\folder\myfolder" with a view appropriate for long filenames on any Windows Vista/Win7 PC.
Customization
Windows Backup command line
Hi all, i'm very happy to be here !!! :D I do not come often because I work a lot! But when I'm there, I am pleased. OK. I have a little problem... I'm looking for the command line of Windows backup (sdclt.exe). I went to the MSDN site and nothing about ! I found in google few commands but...
Backup and Restore
Registry Editing from Command Line
So I am trying to delete some keys from the registry using command line, eventually I am going to turn it into a batch file because it is something I may have to do frequently. Basically I want to delete a folder full of registry keys without having to list every key individually. Anyone have an...
General Discussion
Command line Registry Permission
I found a lot of articles on how to gain full control over a registry key but nothing worked for me. So guys can you help Me?
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 23:47.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App