How to use the reg command line statement

loninappleton

New member
Member
VIP
Local time
1:16 PM
Messages
892
There is a small batch file I would like to execute. I have cut and pasted it from another source.
The batch file failed repeatedly.

Then I attempted to run the statements individually at the command prompt.
Things still failed.

Example:

reg load HKLM\MY_SYSTEM followed by a command in " " marks needs my machine name which is msi64-PC. The machine description is msi64.

But the statement bombs and says pretty much it can't find any part of the statement that is correct.

I can copy out the exact error if needed. But the problem seems to be I'm not pointing at the right thing in the first place or there is a directory conflict.

The sequence is

reg load MY_SYSTEM followed by " a command statement to "0Windows\System32\config\system" in quotes

reg delete followed by what to delete

reg unload which is MY_SYSTEM (to get out of the command)

All of these fail.

I should be able to run the load command at least with no argument from Win7

that statement from the sample looks like this:

reg load HKLM\MY_SYSTEM "%~dp0 (zero)Windows\System32\config\system"

I can add the error at a follow up
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom
OS
Windows 7 x64 Ultimate
CPU
AMD Athlon II x3 450
Motherboard
MSI 880GM
Memory
2 GB
Hard Drives
various
Browser
Firefox, Opera
It might be better if you post the batch file so that we can actually see the syntax and then maybe we can tell what's going on.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Mellon Labs (custom build)
OS
Win 7 Pro x64/Win 10 Pro x64 dual boot
CPU
AMD FX 8350 Vishera @ 4200
Motherboard
ASUS M5A97 R2.0
Memory
16 GB Mushkin Blackline DDR3-2400 @ 1866 (9-10-10-10-31)
Graphics Card(s)
XFX Radeon R9 280 Double D Black Edition
Sound Card
Realtek HD Audio on MB. Sounds great.
Monitor(s) Displays
Acer 24", Acer 22"
Screen Resolution
3840 x 1080
Hard Drives
1 x Mushkin Chronos 120 GB SSD (Win 10)
1 x Samsung 850 EVO 250 GB SSD (Win 7)
1 x WD 1TB SATA Blue
1 x WD 1TB SATA Green
PSU
Corsair TX-750
Case
CoolerMaster HAF 912+
Cooling
Coolermaster Seidon 240M Liquid AIO. 6 case fans
Keyboard
Logitech G710+
Mouse
Logitech G500s
Internet Speed
Much better since I got fiber, but still way overpriced.
Antivirus
MSE, Malware Bytes for scanning
Browser
Firefox
Other Info
Corsair VOID USB headphones.

A Mellon Labs X-1 - LCD Smartie driven system status display.

Brought to you by the letter E
I'm concerned about the content. Don't want to break any rules here.

The first line should be able to be run error free. Can you do that and maybe post a screen shot?

Whenever I see tildes and percent signs I think something is truncated and incomplete.
Are these legitimate characters would be a start.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom
OS
Windows 7 x64 Ultimate
CPU
AMD Athlon II x3 450
Motherboard
MSI 880GM
Memory
2 GB
Hard Drives
various
Browser
Firefox, Opera
Add a pause command as the last statement in your BAT file.
That will keep the CMD window open so you can upload a screen print of the error you see into your SF post.

From the OP, I wonder why your "0Windows\System32\config\system" statement has the 0 in Windows,
maybe that should just be "Windows\System32\config\system"

Are you sure the source you copied this batch file from is reliable and trustworthy ?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
If the Oh or Zero in the statement looks like an error I can certain hand enter it
without and see what happens. It's on the original work.

I will get you the screen shot or text of the error tomorrow is the soonest.
This is no big emergency.

Any entry I make should have _what_ at the MY_SYSTEM statement? I still don't know
what the author of the .bat meant.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom
OS
Windows 7 x64 Ultimate
CPU
AMD Athlon II x3 450
Motherboard
MSI 880GM
Memory
2 GB
Hard Drives
various
Browser
Firefox, Opera
The batch file with errors is shown in the attachment. Moderators can say if it violates any rules. The purpose of the bat file is reset the ability to rearm Win7.

A certain number of rearm commands as in SLMGR -REARM are allowed after which an error issues.

Just now I noticed some strange character at the command screen in the first line. The first line and naming conventions of what was the generic MY_SYSTEM given in the original and described earlier above have the errors.

Lastly if Win7 has a tutorial on the rearm problem and it has been addressed already, please advise.
 

Attachments

  • batch file sample for 7 forums.gif
    batch file sample for 7 forums.gif
    185 KB · Views: 2

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom
OS
Windows 7 x64 Ultimate
CPU
AMD Athlon II x3 450
Motherboard
MSI 880GM
Memory
2 GB
Hard Drives
various
Browser
Firefox, Opera
Back
Top