Test it for yourself.
Copy CALC.EXE to a folder on your system.
Rename it to REGEDIT.EXE.
Add that folder to your system path, BEFORE \Windows (eg:
C:\test;C:\Windows;C:\Windows\System32;etc.)
Open the Run dialog and type regedit (or even regedit.exe if you want).
The calculator will come up instead.
Open the Run dialog and type regedt32. The registry editor will come up.
It's not my belief, it's fact.
I remember trying something similar in the past. In fact I found it today
in the registry and fixed it.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\App Paths\WORDPAD.EXE
was set for something on my Desktop instead of C:\Program Files\Windows
NT\Accessories\wordpad.exe.
Typing write or write.exe in the Run command did nothing. Typing wordpad or
wordpad.exe in the Run command did nothing. Wordpad worked fine from my
Start Menu where I usually start it from.
I wonder how long ago I screwed that up? <shrug>
Anyway, back to our program after these commercial messages. ;-)
I did not try that. I tried this.
I dragged regedit.exe from C:\WINDOWS\system32\dllcache to my Desktop. That
way the one in C:\WINDOWS would not get replaced when I dragged that
regedit.exe to another folder.
WFP complained, but I cancelled that.
Event Type: Information
Event Source: Windows File Protection
Event Category: None
Event ID: 64005
Date: 01-Sep-06
Time: 6:42:09 PM
User: N/A
Computer: MYPENTIUM450
Description:
The protected system file regedit.exe was not restored to its original,
valid version because the Windows File Protection restoration process was
cancelled by user interaction, user name is Wesley P. Vogel. The file
version of the bad file is unknown.
---
Start | Run | Typed: regedit and got this message:
---------------------------
regedit
---------------------------
Windows cannot find 'regedit'. Make sure you typed the name correctly, and
then try again. To search for a file, click the Start button, and then click
Search.
---------------------------
OK
---------------------------
Start | Run | Typed: regedit.exe got a File Download message, clicked Open
on it and got a Program Not Found message. Canceled out of that.
Start | Run | Typed: regedt32 and got the File Download message, clicked
Open on it and nothing happened.
Start | Run | Typed: regedt32.exe and got the File Download message, clicked
Open on it and nothing happened.
Opened C:\WINDOWS\system32 and double clicked regedt32.exe. Nothing
happened. Right clicked regedt32.exe, selected Open. Nothing happened.
Regedt32.exe does not do much of anything with nothing to open.
I dragged regedit.exe from my Desktop back into
C:\WINDOWS\system32\dllcache. A new regedit.exe was not created in
C:\WINDOWS because I had already cancelled the Windows File Protection
restoration process. I suppose that if I rebooted a new regedit.exe would
be created in C:\WINDOWS.
Opened C:\WINDOWS\system32\dllcache and double clicked regedt32.exe.
Regedit.exe opened. Remember that I now have regedit.exe in
C:\WINDOWS\system32\dllcache but not in C:\WINDOWS.
Start | Run | Typed: regedt32 Nothing.
Start | Run | Typed: regedt32.exe Nothing.
Start | Run | Typed: regedit and got this message:
---------------------------
regedit
---------------------------
Windows cannot find 'regedit'. Make sure you typed the name correctly, and
then try again. To search for a file, click the Start button, and then click
Search.
---------------------------
OK
---------------------------
Start | Run | Typed: regedit.exe and got this message:
---------------------------
regedit.exe
---------------------------
Windows cannot find 'regedit.exe'. Make sure you typed the name correctly,
and then try again. To search for a file, click the Start button, and then
click Search.
---------------------------
OK
---------------------------
Now to see if I get a new regedit.exe in C:\WINDOWS after rebooting.
Nope. I had to drag the other regedit.exe back into C:\WINDOWS.
Hmm. Winlogon should've run sfc.exe at boot.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\Winlogon
SFCDisable is set to 0 so WFP is active. Must be because of the cancel I
did earlier on WFP.
Anyway both regedit.exes are back where they belong.
That is what commonly happens with malware created .com files. They are not
real .com files. Or you get a XXX is not a valid Win32 application. Or
some other error message.
[[When you open System Configuration Utility [MSCONFIG], Registry Editor or
Task Manager, they flash for a second and quit. This symptom is caused by
Viruses.]]
Task Manager, MSCONFIG, or REGEDIT disappear while opening
http://www.mvps.org/sramesh2k/ToolsQuit.htm
Since it's got a .COM extension, it will load before
regedit.exe.
It will TRY to load first. Because the malware created .com files are
generally upgefuchted to start with they do not actually run in the usual
sense of the word. They flash and quit and nothing is looking for a file
with the same name but with an .exe extension because a .com file had
already been found. So the system thought that it had done its job.
Actually that's just a copy of regedit.exe, renamed to
Copy_of_Regedit.com.
I may have renamed mine. I honestly do not remember. It was created on 18
February, 2004, that's too long ago for my memory.
I think that I spent more time dicking around with the #$%#$% formatting on
this message to make it look like someone older than 9 typed it. $%#$%!!
OE!
If one did have a malware created regedit.com and the original regedit.exe
in C:\WINDOWS had not been messed with, typing regedt32 in the Run command
would probably open regedit.exe.
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In
Alec S. said: