Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Whether I'm in normal 98se or Safe Mode, when I open up the command prompt and try to run a command (eg "ping x.x.x.x" or "c:\progra~1\example.exe") it returns to me with the message "Cannot execute ***" (*** being the full path, eg C:\WINDOWS\PING.EXE)
This problem has only just popped up as of last week, and it's really making me worry. I get the feeling that this problem is affecting other programs which are necessary to me, and a complete re-install of windows is not something that I'd like to entertain.
Would it be possible to fix it by either repairing the registry in some way, or re-installing the MS-DOS side of Win98se?

Doing the Path command gives me this:
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
Is this correct, or is it lacking?

That PATH is about right.
More to the point, if the exe was not found, you'd get 'bad command or filename'.
Do
SET
]enter] and see what your comspec is.Also try:
format
[enter]FORMAT is a COM file, so that may tell us something.
Also:
mem/c
[enter]
If at first you don't succeed, you're about average.M2

I recall some sort of virus that mucks up .exe's and that there is a fix around called ExeFix08 (still there in Google).
DerekW

I just tried EXEFix08, but it didn't seem to help at all :(
The comspec part of the set command is:
COMSPEC=C:\WINDOWS\COMMAND.COMA bit down, there's a line that says:
CMDLINE=ping
Is this of any relevance?The format command results in
Required parameter missing -mem/c gives me a result that shows no Upper memory in use, nor free. There isn't any free Reserved memory either.

LordBug, Give this a try. Go to the link below and download the Fixswen.inf file. Save the fixswen.inf file to your local hard disk, right-click on the file and choose install.
"A Setup INF file to undo registry changes made by W32/Swen@MM and other threats that prevent REGEDIT, BAT, COM, EXE, PIF, REG and SCR files from running".
It's worth a try,
Tufenuf

MEM is an exe, so at least that runs.
But the report of no upper memory is very odd.
Try:
dir C:\WINDOWS\COMMAND.COM
The size should be 93890; if different, try putting on a fresh copy. It's in the BASE5.CAB
If at first you don't succeed, you're about average.M2

Check WhitPhil's #12 here:
http://www.computing.net/windows95/wwwboard/forum/166679.html
If that virus is causing the problem, use the 'find files or folders' to search for the files that don't seem to run. Since the files are probably hidden you need to change the view option to show them. Open 'my computer', then VIEW--FOLDER OPTIONS--VIEW and check 'show all files' under 'hidden files'. Then do the search.
There's a good chance they'd be in the windows\system folder. You can do a quick check there using dir/a:h c:\windows\system from a dos prompt. Folder.htt and desktop.ini are the only two files that show on mine. Be suspicious of any others.

Just so you don't have to go through that entire thread, I had a computer that wasn't running certain commands. It turned out a virus had created bogus hidden files of the same name and put them in the system folder.
Windows will run files in that folder first unless a path is specified when running it. (The dos PATH is not the same as the windows path.)
If the above doesn't seem to be the problem there's another thing to check. Of those files that don't run, check the file date, time and size to see if they match the correct files. Post them back if you're not sure.

jubalsams,
Actually, ping is one of the first examples he gave.
DAVEINCAPS,
Since you know your stuff, I'll take your word for it that 98 will run something in the system folder, regardless of the PATH.
Weird, though.
If at first you don't succeed, you're about average.M2

Mechanix2go - I've already restored the Command.com file a few times with SFC. That filesize is exact.
jubalsams - ping computing.net gives the error
Cannot execute C:\WINDOWS\PING.exeNotepad gives the same error, just
Cannot execute C:\WINDOWS\NOTEPAD.exeThe only *.EXE's I can appear to run are the ones in the Windows\Command folder. And not even all of them work (eg Scandisk fails to start the Win32 Scandisk application, though it doesn't give the error message)
Dave, I don't suspect that it's that virus that's having an effect on my computer. Any *.EXE file that I try to execute from the dos prompt, regardless of location, gives the same message "Cannot execute drive:\path\filename.exe"
I asked someone today, and they said they'd had the same problem. They couldn't remember how they'd fixed it, but had said it was related to the memory.
Checking the memory section of the Dos prompt properties shows the EMS is not configured on the system. Can anyone suggest how I might configure it, to see if it's that causing the problem?

Carrying on to what DAVEINCAPS said, try this to see if some bug has added a spurious exe:
attrib /s c:\ping.*
and so on for notepad etc.
If at first you don't succeed, you're about average.M2

Out of curiousity, try running that ones that fail in DOS, from Windows.
Ie: Notepad, scandisk and the ones in \Command
That should help narrow down whether it's a problem with the programs, or the DOS environment

Petit Jean - That's what originally revealed the problem to me. I was attempting to ping my router, when I discovered that the DOS Prompt no longer liked me :(
Mechanix2Go - There's only the Windows\ping.exe, a ping.exe found in the Windows\sfc\helpdesk\ folder, and the ping.lgc file. Amongst other files with ping in the name, but being totally unrelated.
Same/similar with other *.exe's
WhitPhil - Opening notepad directly from the exe works. Trying it from the prompt fails. another one I tried was an executable installer for a random program.Run the installer direct, it works. Try and run it from the prompt, the exact same message of "Cannot execute xxx" is returned.

As a subnote, I won't be able to give any more replies for the next couple of days as I won't have computer/internet access.

Are you saying if you run Notepad (and the other files) from START--RUN, it runs but if you open a dos windows and type 'notepad' at the prompt it doesn't run?
You might want to recreate the 'ms-dos prompt.pif' file. First delete the old one. Then create a shortcut to c:\windows\command.com, rename it MS-DOS PROMPT.PIF and drag it to the windows\start menu\programs folder

Start/Run - Opens the program fine.
DOS Prompt - "Cannot Execute ***/***.exe"
Recreating the ms-dos.pif file does nothing. Whether I run it as "command.com" from run, or the MS-DOS shortcut, or whatever way, it fails to execute any commands.
But as I said, the "EMS" is not enabled. When I view the supposed reason, it claims it has the "NOEMS" tag in the line. Which it doesn't.
A workmate of mine says he's encountered it before. And fixing it required re-enabling the EMS. Which is the part I cannot work out how to re-enable.

"But as I said, the "EMS" is not enabled. When I view the supposed reason, it claims it has the "NOEMS" tag in the line. Which it doesn't."
Post your config & autoexec.
If at first you don't succeed, you're about average.M2

Config.sys: (Stacks=0,0 has been like that for a good year or so. The rest has been additions since this problem has popped up)
Rem TShoot:
DEVICE=C:\WINDOWS\HIMEM.SYS
Rem TShoot:
DEVICE=C:\WINDOWS\EMM386.exe RAM AUTO NOTR
STACKS=0,0
Rem TShoot:
FILES=99
Autoexec.bat: (Everything is as it was before the problem showed up)@C:\LETASSIG\LETASSIG.exe @LETTERS.INI /O:DRIVEMAP.DAT /CD
C:\WINDOWS\cwcdata\cwcdos.exe
rem SET PATH=%PATH%;C:\PROGRA~1\ATITEC~1\ATICON~1
subst A: C:\win98
rem SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\ULEADS~1\MPEG;C:\PROGRA~1\COMMON~1\ULEADS~1\DVD

Try it with your EMM386 line REMed out.
If at first you don't succeed, you're about average.M2

REMing the EMM386 line doesn't do anything apart from preventing a message I get at startup (Before entering Windows), which says EMM386 isn't installed properly.

Run msconfig, check 'selective startup' and uncheck the loading of config.sys and autoexec.bat. Apply, OK and reboot. Then see if that makes any difference.

Oh
My
God
I just managed to fix it. I'm amazed. Simply stunned.Disabling the running of config.sys and autoexec.bat did nothing (Though it felt like it made my startup take longer).
But I decided to run SysInternal's FileMon program whilst attempting to execute something via the Command Prompt.Each time I tried, FileMon showed the file "Conagent.exe" attempting to be accessed, amongst others. When I checked to see that all the files were present, I discovered that Conagent.exe was not there. Restored it with SFC, and voila! My command prompt is working again :D
Jeez do I feel the fool.
Regardless, thankyou all for all your help. It's really nice to know that there are still people who haven't abandoned knowledge of Win98 :)

Why would you feel like a fool? You figured it out.
Conagent.exe is described as '32 bit console support'. I found this:
The MS-DOS window that pops up when a command is executed is not the same as the MS-DOS Prompt window.
In the first case "c:\windows\system\conagent.exe" is executed; in the second case "c:\windows\command.com" is executed.
Apparently there's also a virus that copies itself by several names, one of which is conagent.exe. Possibly a virus scan is what removed it in the first place.

I just did a little googling because I didn't know what it was either. LordBug figured it out. This is one of the threads I'll keep track of because all my searching didn't find that particular error associated with a missing conagent.exe.

I just wish I'd thought of using FileMon earlier. It's a really helpful program, especially when teamed up with RegMon and Process Explorer (Found at
http://www.sysinternals.com/ProcessesAndThreadsUtilities.html
)I also suspect it may have been me that deleted Conagent.exe in the first place. Took note of the exe having been scanned by Avast! and decided to Google it, and got too excited by the first entry.
Note to self - rename suspicious files before deleting them in the future.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |