What is the command for/what does it do?

Philippine Mango

Diamond Member
Oct 29, 2004
5,594
0
0
cmd /c "echo Windows Registry Editor Version 5.00 >> c:\reg.reg && echo. >> c:\reg.reg && echo [-HKEY_LOCAL_MACHINE\SOFTWARE] >> c:\reg.reg && regedit -s c:\reg.reg


Oh yea and FYI, DO NOT TRY THIS! So Can anyone point out what each sequence of words means what?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
cmd /c /C Carries out the command specified by string and then terminates
echo Displays messages, or turns command-echoing on or off.
...

command /?

Basically you're overwriting the file c:\reg.reg with
Windows Registry Editor Version 5.00
.
[-HKEY_LOCAL_MACHINE\SOFTWARE]

Then you open it with regedit.
 

Philippine Mango

Diamond Member
Oct 29, 2004
5,594
0
0
Yea I guess my dos commands are a little fuzzy. The only part I knew was that echo=display onto screen. What that command essentially did was screw up my registry which meant I had to reinstall... Luckily this was only my laptop and since I don't keep much on there, it wasn't a big deal. The - symbol on "HKEY_LOCAL_MACHINE\SOFTWARE" essentially says to delete it right?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Philippine Mango
Yea I guess my dos commands are a little fuzzy. The only part I knew was that echo=display onto screen. What that command essentially did was screw up my registry which meant I had to reinstall... Luckily this was only my laptop and since I don't keep much on there, it wasn't a big deal. The - symbol on "HKEY_LOCAL_MACHINE\SOFTWARE" essentially says to delete it right?

I don't think so. I think my post above is correct (the quoted part is all that was left of your registry ;)).
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: n0cmonkey
Originally posted by: Philippine Mango
Yea I guess my dos commands are a little fuzzy. The only part I knew was that echo=display onto screen. What that command essentially did was screw up my registry which meant I had to reinstall... Luckily this was only my laptop and since I don't keep much on there, it wasn't a big deal. The - symbol on "HKEY_LOCAL_MACHINE\SOFTWARE" essentially says to delete it right?

I don't think so. I think my post above is correct (the quoted part is all that was left of your registry ;)).

Actually he is right, the - symbol indicates that the key and below is to be deleted upon reg merge.

Bill
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: bsobel
Originally posted by: n0cmonkey
Originally posted by: Philippine Mango
Yea I guess my dos commands are a little fuzzy. The only part I knew was that echo=display onto screen. What that command essentially did was screw up my registry which meant I had to reinstall... Luckily this was only my laptop and since I don't keep much on there, it wasn't a big deal. The - symbol on "HKEY_LOCAL_MACHINE\SOFTWARE" essentially says to delete it right?

I don't think so. I think my post above is correct (the quoted part is all that was left of your registry ;)).

Actually he is right, the - symbol indicates that the key and below is to be deleted upon reg merge.

Bill

That happens with an echo? :confused:

EDIT: Oh, so this file gets merged into the registry?
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Well yeah. But if you do regedit -s file.reg, it will do an import ;) The -s just suppresses the dialog boxes that ask if you want to merge the file.

And in this case, the import was a deletion. The entire software hive, which is a good reason why the machine got screwed up.

OP, what were you trying to accomplish, anyway?
 

Philippine Mango

Diamond Member
Oct 29, 2004
5,594
0
0
I was looking at a site for "win XP easter eggs" and I was tired but thought "hey, mind as well try this command". So I tried it, and nothing happened so I then tried something else but when I right clicked on the desktop, almost all of the options were missing (cut, copy paste, properties) so I restarted the machine where the system would get past the WinXP logo but then hault. As I was copying THAT command, I was thinking of the lottery ad where they say "Upside, trying something new", then 5 secs later the waiter comes with the food and then says "Downside, having to eat it". I guess I got the down side!:(:eek:

I knew that it was a registry command but for some moronic reason I didn't prevent my self from NOT doing it....
 

Philippine Mango

Diamond Member
Oct 29, 2004
5,594
0
0
Oh I got a another question, had I backedup my registry, how would I have replaced the registry to where it was? Because I tried to do a "repair" with my winXP cd and when it prompted for the password for the Admin account, it said incorrect password.
 

JW310

Golden Member
Oct 30, 1999
1,582
0
0
Originally posted by: Philippine Mango
Oh I got a another question, had I backedup my registry, how would I have replaced the registry to where it was? Because I tried to do a "repair" with my winXP cd and when it prompted for the password for the Admin account, it said incorrect password.

I believe there's a bug in the recovery console on some of the winXP CDs. Follow the instructions here: http://support.microsoft.com/default.aspx?scid=kb;EN-US;308402 to get a set of setup boot disks that should let you into the recovery console.

Then, once you're in recovery console, follow the instructions here: http://support.microsoft.com/default.aspx?scid=kb;en-us;307545 . It walks you through 1) replacing the registry with the default registry from when Windows was first installed, then 2) replacing that default registry with a copy of the registry automatically created by System Restore. I've done this to repair a corrupt registry, and it's worked like a charm. Should help you with your situation, too.

JW
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Philippine Mango
Oh I got a another question, had I backedup my registry, how would I have replaced the registry to where it was? Because I tried to do a "repair" with my winXP cd and when it prompted for the password for the Admin account, it said incorrect password.

Bart's PE boot disks are great for this... ;)