Solved backup registry in command line

bob363

New member
Local time
12:01 AM
Messages
16
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 My Computer

At a glance

windows 7 home premium 64 bit
OS
windows 7 home premium 64 bit
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. http://www.sevenforums.com/tutorials/4230-registry-backup-restore.html
 

My Computers My Computers

  • At a glance

    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Bo...AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd r...Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper ...MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 o...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    Custom builds = 2
    OS
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
    CPU
    AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd remote pc
    Motherboard
    Gigabyte GA-790XTA-UD4-Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper X Fury 8gb 2nd
    Graphics Card(s)
    MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 on mini tower
    Sound Card
    Creative Labs X-Fi Xtreme Audio P - Realtek onooard 2nd case
    Monitor(s) Displays
    ASUS VW199T-P 19" HP 2082a Main-HP 2082a 20" remote pc
    Screen Resolution
    Asus 1440x900 - HP 1600x900
    Hard Drives
    WD Black 1TB HD per OS W7, W10, and pending W11 presently on 500gb OS Drive - Pending Triple 1TB HDs for Spanned Storage/backup volume
    Single 2TB external USB enclosure, single 1TB System 7 Host/Boot drive, Pending 8TB external HD for system image b
    PSU
    Corsair 750TX - primary / Corsair CX600 - second
    Case
    Antec 900-2 - SSD compatible / NZXT Vulcan mini tower
    Cooling
    Zalman CNPS9900A
    Keyboard
    AZIO L70 Backlit Letters Gaming - ONN Cordless/USB
    Mouse
    MSI DS200 Programmable, Logitech Cordless
    Internet Speed
    30mbps upgrade - primary hard wired - mini tower usb WiFi
    Antivirus
    GFI VIPRE Internet Security 2014 on W7 2016 beta on W10,
    Browser
    Cyberfox, WaterFox 64bit FF variants, FireFox x64, Pale Moon
    Other Info
    Accomdata fan cooled usb 2.0 PIDE/Sata II, III external enclosure.
    Sambient usb/eSata PATA/Sata II, III external enclosure.
  • At a glance

    W7 Pro x64/W11 ProAMD Deneb 3.6ghz - 965Kingston Hyper X Fury 8gbMSI HD Radeon 6450 DVI Output
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    CUSTOM ASSEMBLY
    OS
    W7 Pro x64/W11 Pro
    CPU
    AMD Deneb 3.6ghz - 965
    Motherboard
    Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X Fury 8gb
    Graphics Card(s)
    MSI HD Radeon 6450 DVI Output
    Sound Card
    Realtek onooard Creative or Other separate PENDING
    Monitor(s) Displays
    VIZIO 32" LCD TV Separate LCD Pending
    Screen Resolution
    1600x1080
    Hard Drives
    WD 500GB OS Host/Boot WD Green 1TB Storage/Backup
    PSU
    Corsair 600W - THERMALTAKE 600W spare case
    Case
    NZXT Vulcan mini tower
    Cooling
    Twin 120mm Top Fans - 240mm Side Cover
    Keyboard
    ONN Cordless/USB Logitech Cordless
    Mouse
    ONN USB/Cordless - Logitech Cordless
    Internet Speed
    DSL 5G
    Browser
    MS Edge, FireFox, WaterFox x64, FireFox Nightly
    Other Info
    OS Testing-Remote Access to Main TeamViewer
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 My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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 My Computer

At a glance

windows 7 home premium 64 bit
OS
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
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 My Computer

At a glance

Windows 7 Ultimate 64 bit SP1 x64AMD Phenom X4 95008 GBATI Radeon HD 4600 Series
Computer Manufacturer/Model Number
ASUSTeK Computer INC. M3A32-MVP DELUXE (CPU 1)
OS
Windows 7 Ultimate 64 bit SP1 x64
CPU
AMD Phenom X4 9500
Motherboard
ASUSTeK M3A32-MVP Deluxe (CPU 1)
Memory
8 GB
Graphics Card(s)
ATI Radeon HD 4600 Series
Sound Card
AMD High Definition Audio Device
Monitor(s) Displays
SyncMaster (1680x1050@60Hz)
Hard Drives
59GB OCZ-VERTEX2 ATA Device
+
977GB SAMSUNG HD103SJ ATA Device
+
625GB WDC WD6401AALS-00L3B2 ATA Device
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 My Computers

  • At a glance

    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Bo...AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd r...Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper ...MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 o...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    Custom builds = 2
    OS
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
    CPU
    AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd remote pc
    Motherboard
    Gigabyte GA-790XTA-UD4-Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper X Fury 8gb 2nd
    Graphics Card(s)
    MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 on mini tower
    Sound Card
    Creative Labs X-Fi Xtreme Audio P - Realtek onooard 2nd case
    Monitor(s) Displays
    ASUS VW199T-P 19" HP 2082a Main-HP 2082a 20" remote pc
    Screen Resolution
    Asus 1440x900 - HP 1600x900
    Hard Drives
    WD Black 1TB HD per OS W7, W10, and pending W11 presently on 500gb OS Drive - Pending Triple 1TB HDs for Spanned Storage/backup volume
    Single 2TB external USB enclosure, single 1TB System 7 Host/Boot drive, Pending 8TB external HD for system image b
    PSU
    Corsair 750TX - primary / Corsair CX600 - second
    Case
    Antec 900-2 - SSD compatible / NZXT Vulcan mini tower
    Cooling
    Zalman CNPS9900A
    Keyboard
    AZIO L70 Backlit Letters Gaming - ONN Cordless/USB
    Mouse
    MSI DS200 Programmable, Logitech Cordless
    Internet Speed
    30mbps upgrade - primary hard wired - mini tower usb WiFi
    Antivirus
    GFI VIPRE Internet Security 2014 on W7 2016 beta on W10,
    Browser
    Cyberfox, WaterFox 64bit FF variants, FireFox x64, Pale Moon
    Other Info
    Accomdata fan cooled usb 2.0 PIDE/Sata II, III external enclosure.
    Sambient usb/eSata PATA/Sata II, III external enclosure.
  • At a glance

    W7 Pro x64/W11 ProAMD Deneb 3.6ghz - 965Kingston Hyper X Fury 8gbMSI HD Radeon 6450 DVI Output
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    CUSTOM ASSEMBLY
    OS
    W7 Pro x64/W11 Pro
    CPU
    AMD Deneb 3.6ghz - 965
    Motherboard
    Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X Fury 8gb
    Graphics Card(s)
    MSI HD Radeon 6450 DVI Output
    Sound Card
    Realtek onooard Creative or Other separate PENDING
    Monitor(s) Displays
    VIZIO 32" LCD TV Separate LCD Pending
    Screen Resolution
    1600x1080
    Hard Drives
    WD 500GB OS Host/Boot WD Green 1TB Storage/Backup
    PSU
    Corsair 600W - THERMALTAKE 600W spare case
    Case
    NZXT Vulcan mini tower
    Cooling
    Twin 120mm Top Fans - 240mm Side Cover
    Keyboard
    ONN Cordless/USB Logitech Cordless
    Mouse
    ONN USB/Cordless - Logitech Cordless
    Internet Speed
    DSL 5G
    Browser
    MS Edge, FireFox, WaterFox x64, FireFox Nightly
    Other Info
    OS Testing-Remote Access to Main TeamViewer
Did you try what I suggested?
 

My Computer My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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 My Computer

At a glance

windows 7 home premium 64 bit
OS
windows 7 home premium 64 bit
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 My Computers

  • At a glance

    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Bo...AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd r...Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper ...MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 o...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    Custom builds = 2
    OS
    W7 Ultimate x64/W10 Pro x64/W11 Pro Triple Boot - Main PC W7 Remote PC Micro ATX W7 Pro x64/W11 Pro
    CPU
    AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd remote pc
    Motherboard
    Gigabyte GA-790XTA-UD4-Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper X Fury 8gb 2nd
    Graphics Card(s)
    MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 on mini tower
    Sound Card
    Creative Labs X-Fi Xtreme Audio P - Realtek onooard 2nd case
    Monitor(s) Displays
    ASUS VW199T-P 19" HP 2082a Main-HP 2082a 20" remote pc
    Screen Resolution
    Asus 1440x900 - HP 1600x900
    Hard Drives
    WD Black 1TB HD per OS W7, W10, and pending W11 presently on 500gb OS Drive - Pending Triple 1TB HDs for Spanned Storage/backup volume
    Single 2TB external USB enclosure, single 1TB System 7 Host/Boot drive, Pending 8TB external HD for system image b
    PSU
    Corsair 750TX - primary / Corsair CX600 - second
    Case
    Antec 900-2 - SSD compatible / NZXT Vulcan mini tower
    Cooling
    Zalman CNPS9900A
    Keyboard
    AZIO L70 Backlit Letters Gaming - ONN Cordless/USB
    Mouse
    MSI DS200 Programmable, Logitech Cordless
    Internet Speed
    30mbps upgrade - primary hard wired - mini tower usb WiFi
    Antivirus
    GFI VIPRE Internet Security 2014 on W7 2016 beta on W10,
    Browser
    Cyberfox, WaterFox 64bit FF variants, FireFox x64, Pale Moon
    Other Info
    Accomdata fan cooled usb 2.0 PIDE/Sata II, III external enclosure.
    Sambient usb/eSata PATA/Sata II, III external enclosure.
  • At a glance

    W7 Pro x64/W11 ProAMD Deneb 3.6ghz - 965Kingston Hyper X Fury 8gbMSI HD Radeon 6450 DVI Output
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    CUSTOM ASSEMBLY
    OS
    W7 Pro x64/W11 Pro
    CPU
    AMD Deneb 3.6ghz - 965
    Motherboard
    Gigabyte GA-880GM-D2H remote pc
    Memory
    Kingston Hyper X Fury 8gb
    Graphics Card(s)
    MSI HD Radeon 6450 DVI Output
    Sound Card
    Realtek onooard Creative or Other separate PENDING
    Monitor(s) Displays
    VIZIO 32" LCD TV Separate LCD Pending
    Screen Resolution
    1600x1080
    Hard Drives
    WD 500GB OS Host/Boot WD Green 1TB Storage/Backup
    PSU
    Corsair 600W - THERMALTAKE 600W spare case
    Case
    NZXT Vulcan mini tower
    Cooling
    Twin 120mm Top Fans - 240mm Side Cover
    Keyboard
    ONN Cordless/USB Logitech Cordless
    Mouse
    ONN USB/Cordless - Logitech Cordless
    Internet Speed
    DSL 5G
    Browser
    MS Edge, FireFox, WaterFox x64, FireFox Nightly
    Other Info
    OS Testing-Remote Access to Main TeamViewer
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 My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
I think you made the file name in the location you are saving to the same name as the reg backup.

For example, you may have created a file in C:\Windows called "regbackup" and then used the command:

reg export hkey_local_machine\software\microsoft\windows c:\windows\regbackup

This is what I did at first when I was researching how to create the reg backup:o.

I deleted the file and ran the cmd again and reg.edit made the backup as a file in C:\Windows

It also came up as an unknown file type at first.

When trying to open use the option "Search through windows" to open the file and then open with notepad.

And there you have it, your file is created.
 

My Computer My Computer

At a glance

Windows 7 Professional x64Intel (R) Core(TM) i3-3240 CPU @3.4GHz 3.4GHz16GBAMD Radeon HD
Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
Windows 7 Professional x64
CPU
Intel (R) Core(TM) i3-3240 CPU @3.4GHz 3.4GHz
Motherboard
MSI Z77A-GD80 (MS-7757)Serial=Unfilled by O.E.M. Version:1.0
Memory
16GB
Graphics Card(s)
AMD Radeon HD
Hard Drives
111GB SSD(OS) + 2TB
Browser
Chrome
Might I suggest that if a topic becomes irrelevant within a few days,
it should at some time become automatically locked to prevent accidental resuscitation a few years later :)
 

My Computer My Computer

At a glance

Windows 7 Ultimate 64 bit SP1 x64AMD Phenom X4 95008 GBATI Radeon HD 4600 Series
Computer Manufacturer/Model Number
ASUSTeK Computer INC. M3A32-MVP DELUXE (CPU 1)
OS
Windows 7 Ultimate 64 bit SP1 x64
CPU
AMD Phenom X4 9500
Motherboard
ASUSTeK M3A32-MVP Deluxe (CPU 1)
Memory
8 GB
Graphics Card(s)
ATI Radeon HD 4600 Series
Sound Card
AMD High Definition Audio Device
Monitor(s) Displays
SyncMaster (1680x1050@60Hz)
Hard Drives
59GB OCZ-VERTEX2 ATA Device
+
977GB SAMSUNG HD103SJ ATA Device
+
625GB WDC WD6401AALS-00L3B2 ATA Device
The forum code should give you a warning if you are replying to a thread that is more than 30 or 60 days old. That would cut down on resurrecting old, dead threads, at least somewhat.
 

My Computer My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
I felt the need to reply, simply because when I have problems that I can't solve, I search google.com for answers. I did not see the answer I believed to be the solution - so I thought, well if someone else runs into this, they'll probably find this forum and use it to troubleshoot. And if it turns out that was what the user was doing, then I'm sure anyone else who didn't have clarification would be grateful to find the post.

I do apologize for responding to an old thread. I meant no harm.

Furthermore, when posting I was issued a warning about the thread being old, but nowhere did the warning state that this was against forum rules. And so I continued to submit the post because of the reason stated above.
 

My Computer My Computer

At a glance

Windows 7 Professional x64Intel (R) Core(TM) i3-3240 CPU @3.4GHz 3.4GHz16GBAMD Radeon HD
Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
Windows 7 Professional x64
CPU
Intel (R) Core(TM) i3-3240 CPU @3.4GHz 3.4GHz
Motherboard
MSI Z77A-GD80 (MS-7757)Serial=Unfilled by O.E.M. Version:1.0
Memory
16GB
Graphics Card(s)
AMD Radeon HD
Hard Drives
111GB SSD(OS) + 2TB
Browser
Chrome
Good to know there was a warning :)

I agree with you though that sometimes adding to an old thread could be helpful to someone later on who is experiencing a similar problem.
 

My Computer My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Back
Top