backup registry in command line

Page 1 of 2 12 LastLast

  1. Posts : 16
    windows 7 home premium 64 bit
       #1

    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 Computer


  2. Posts : 8,375
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
       #2

    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 Computers


  3. Posts : 6,285
    Windows 10 Pro X64
       #3

    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 Computer


  4. Posts : 16
    windows 7 home premium 64 bit
    Thread Starter
       #4

    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 Computer


  5. Posts : 264
    Windows 7 Ultimate 64 bit SP1 x64
       #5

    bob363 said:
    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 Computer


  6. Posts : 8,375
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
       #6

    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 Computers


  7. Posts : 6,285
    Windows 10 Pro X64
       #7

    Did you try what I suggested?
      My Computer


  8. Posts : 16
    windows 7 home premium 64 bit
    Thread Starter
       #8

    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 Computer


  9. Posts : 8,375
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
       #9

    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 Computers


  10. Posts : 6,285
    Windows 10 Pro X64
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 12:24.
Find Us