"Cannot find file" error when using run command

  • Thread starter Thread starter Tekla
  • Start date Start date
T

Tekla

I have Windows 2000 Pro, and it has the following annoying behavior.
If I try to execute a command by Start->Run, and then typing the
command, I get a "Cannot find file" error. However, the program
*does* start.

E.g., upon Start->Run->cmd, an error box appears that says

Cannot find file 'cmd' (or one of its components). Make sure the
path and filename are correct and that all shared libraries are
available.

Nevertheless, the command line box for c:\windows\system32\cmd.exe
opens and is functional -- i.e., cmd.exe is executed.

On searching the Web and in particular groups, I saw this problem
posted about 3 years ago in annoyances.org, but no solution.

Tekla
 
Well if your on "windows 2000 pro" your cmd.exe should be
in c:\winnt\system32. If it is where you say it is you
probably did an upgrade option from a lesser operating
system?

1) do other programs work suck as start > run > notepad
or wordpad or mspaint etc?

2) You can try fixing your environment variables by right
clicking my computer and going to properties, then the
last tab advanced and edit the system variable Path to
include your correct system directory
C:\windows\system\;etc;etc
 
Michael,

Thanks for your reply. I did do an upgrade from Win 98.

1) Whatever .exe file I try to run, I get the same result. I get a
"Cannot find file" error message as cited, but nevertheless the
program opens. Same for notepad, wordpad, mspaint, and so on.

2) My path includes c:\windows\system32. Is there any reason to
doubt that this is my correct system directory?

Tekla
 
2) My path includes c:\windows\system32. Is there any reason to
doubt that this is my correct system directory?

yes because windows 2000 not upgraded has the c:\winnt directory and
not c:\windows. Did your try the option i suggested in your
environment variables?

 
Mike,

Adding c:\windows\system to the path does not change the annoying
behavior.

According to Start->Help->systemroot,

"systemroot is the path and folder name where the Windows 2000 system
files are located. Typically, this is C:\winnt, although you can
designate
a different folder when you install Windows 2000."

The systemroot folder on my machine is c:\windows.
(Start->Run->%systemroot% opens the c:\windows folder)

c:\winnt is not the system folder: it contains only one folder which
contains only one folder and that folder is empty.

I am not the person that did the upgrade to Win 2000, but looking at
c:\windows\system and c:\windows\system32, I conclude that the latter
folder was created at the time of the upgrade and that the current
system files must be the ones in there.

Anyway, this is probably all irrelevant, because making the change you
suggested did not prevent the annoying error message from popping up.

Tekla
 
I wrote a typo to you it should be "system32" not "system"


so not that your %systemroot% is correct you should have at least this
in your environment variables

%SystemRoot%;%SystemRoot%\System32;%SystemRoot%\System32\Wbem
 
Mike,

My %sytemroot% was correct all along. I did not change it. In the
course of this exchange I already told you that c:\windows\system32
was in my path. The other two folders you list are also in my path
and have been all along. The only change in my path that I made was
to add the incorrect folder (typo, as you say) that you suggested.

The problem is not my path.

I am still getting the "Cannot find file" error when I use Start->Run.

Tekla
 
Well i dont know what else to suggest. How about isntalling it all
over from scratch? if its that imporatant to you? haha

It wouldnt hurt to do a true install of windows 2000. Since you have
chose the upgrade option your file system is still the old FAT file
system which has no security and not the native file system for it as
NTFS is.
 
Back
Top