Computing.Net > Forums > Windows 95/98 > MSDos prompt cannot execute *.exe's

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

MSDos prompt cannot execute *.exe's

Reply to Message Icon

Name: LordBug
Date: December 5, 2005 at 06:13:27 Pacific
OS: Win98se
CPU/Ram: Athlon2600+/512MB
Comment:

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?



Sponsored Link
Ads by Google

Response Number 1
Name: Jennifer SUMN
Date: December 5, 2005 at 06:21:51 Pacific
Reply:

Have you checked your path so make sure it includes the proper folders?

Soylent Green is PEOPLE!!!


0

Response Number 2
Name: LordBug
Date: December 5, 2005 at 06:26:33 Pacific
Reply:

Doing the Path command gives me this:

PATH=C:\WINDOWS;C:\WINDOWS\COMMAND

Is this correct, or is it lacking?


0

Response Number 3
Name: Mechanix2Go
Date: December 5, 2005 at 07:13:39 Pacific
Reply:

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


0

Response Number 4
Name: Derek
Date: December 5, 2005 at 14:31:41 Pacific
Reply:

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


0

Response Number 5
Name: LordBug
Date: December 5, 2005 at 14:55:47 Pacific
Reply:

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.COM

A 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.


0

Related Posts

See More



Response Number 6
Name: Tufenuf
Date: December 5, 2005 at 15:07:45 Pacific
Reply:

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".

Fixswen Tool

It's worth a try,
Tufenuf


0

Response Number 7
Name: LordBug
Date: December 5, 2005 at 15:26:23 Pacific
Reply:

Unfortunately FixSwen.inf didn't work :(
Thanks anyway, I'm willing to try most little fixes.


0

Response Number 8
Name: Mechanix2Go
Date: December 5, 2005 at 16:36:04 Pacific
Reply:

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


0

Response Number 9
Name: jubalsams
Date: December 5, 2005 at 19:16:39 Pacific
Reply:

You never gave an exact example and mem.exe runs, try:

ping computing.net

or:

notepad


Best


0

Response Number 10
Name: DAVEINCAPS
Date: December 5, 2005 at 22:31:40 Pacific
Reply:

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.


0

Response Number 11
Name: DAVEINCAPS
Date: December 5, 2005 at 22:44:10 Pacific
Reply:

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.


0

Response Number 12
Name: Mechanix2Go
Date: December 6, 2005 at 02:24:27 Pacific
Reply:

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


0

Response Number 13
Name: LordBug
Date: December 6, 2005 at 03:07:49 Pacific
Reply:

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.exe

Notepad gives the same error, just
Cannot execute C:\WINDOWS\NOTEPAD.exe

The 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?


0

Response Number 14
Name: Petit Jean
Date: December 6, 2005 at 05:09:15 Pacific
Reply:

Try the ping command from the dos prompt without path.
ping x.x.x.x
Good luck.


0

Response Number 15
Name: Mechanix2Go
Date: December 6, 2005 at 05:28:06 Pacific
Reply:

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


0

Response Number 16
Name: WhitPhil
Date: December 6, 2005 at 06:21:20 Pacific
Reply:

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


0

Response Number 17
Name: LordBug
Date: December 6, 2005 at 15:19:36 Pacific
Reply:

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.


0

Response Number 18
Name: LordBug
Date: December 6, 2005 at 15:50:53 Pacific
Reply:

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.


0

Response Number 19
Name: DAVEINCAPS
Date: December 6, 2005 at 16:39:23 Pacific
Reply:

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


0

Response Number 20
Name: LordBug
Date: December 12, 2005 at 03:09:48 Pacific
Reply:

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.


0

Response Number 21
Name: Mechanix2Go
Date: December 12, 2005 at 03:31:44 Pacific
Reply:

"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


0

Response Number 22
Name: LordBug
Date: December 12, 2005 at 05:51:59 Pacific
Reply:

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


0

Response Number 23
Name: Mechanix2Go
Date: December 12, 2005 at 06:04:52 Pacific
Reply:

Try it with your EMM386 line REMed out.


If at first you don't succeed, you're about average.

M2


0

Response Number 24
Name: LordBug
Date: December 12, 2005 at 15:03:16 Pacific
Reply:

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.


0

Response Number 25
Name: DAVEINCAPS
Date: December 12, 2005 at 15:19:59 Pacific
Reply:

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.


0

Response Number 26
Name: LordBug
Date: December 12, 2005 at 21:23:27 Pacific
Reply:

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 :)


0

Response Number 27
Name: Mechanix2Go
Date: December 12, 2005 at 22:00:12 Pacific
Reply:

What's Conagent.exe?


If at first you don't succeed, you're about average.

M2


0

Response Number 28
Name: DAVEINCAPS
Date: December 12, 2005 at 22:33:23 Pacific
Reply:

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.

here

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.



0

Response Number 29
Name: Mechanix2Go
Date: December 12, 2005 at 23:10:03 Pacific
Reply:

Diamond DAVE does it again!


If at first you don't succeed, you're about average.

M2


0

Response Number 30
Name: DAVEINCAPS
Date: December 12, 2005 at 23:39:00 Pacific
Reply:

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.


0

Response Number 31
Name: LordBug
Date: December 13, 2005 at 01:26:56 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: MSDos prompt cannot execute *.exe's

Cannot execute EXE Files after download www.computing.net/answers/windows-95/cannot-execute-exe-files-after-download/1103.html

cannot execute DOS command from W98Se www.computing.net/answers/windows-95/cannot-execute-dos-command-from-w98se/100223.html

Cannot Execute Downloaded EXEs www.computing.net/answers/windows-95/cannot-execute-downloaded-exes/137770.html