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: How to use the reg command line statement

12 Mar 2016   #1
loninappleton

Windows 7 x64 Ultimate
 
 
How to use the reg command line statement

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 System SpecsSystem Spec
.
12 Mar 2016   #2
Mellon Head

Win 7 Pro x64/Win 10 Pro x64 dual boot
 
 

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 System SpecsSystem Spec
12 Mar 2016   #3
loninappleton

Windows 7 x64 Ultimate
 
 

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 System SpecsSystem Spec
.

12 Mar 2016   #4
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

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 System SpecsSystem Spec
12 Mar 2016   #5
loninappleton

Windows 7 x64 Ultimate
 
 

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 System SpecsSystem Spec
13 Mar 2016   #6
loninappleton

Windows 7 x64 Ultimate
 
 

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.


Attached Thumbnails
How to use the reg command line statement-batch-file-sample-7-forums.gif  
My System SpecsSystem Spec
Reply

 How to use the reg command line statement




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Executing command line command anywhere ?
I want to create a setup whereas a command line command can be run from any directory/folder, without having to be in the directory/folder whereas the command line command resides ?
General Discussion
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
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
Gpedit via command line
how can I enable disable a policy using gpedit! Not via the GUI, you go do some clicks and enable. But I want to execute one shot command which will say disable AutoRun. I have searched exenstively, no results. I kind need this for my automation stuff. Thanks, Akshay
Performance & Maintenance
How to run a command line utility?
Hi, I am trying to run a command line prompt utility from Microsoft on windows 7. Sure I am doing something wrong, after I click the downloaded .exe file the command prompt pops up briefly then disappears. Can someone explain the basics of running a command line utility on win7? Thanks! ...
General Discussion
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
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 09:43.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App