Solved windows 98 cannot execute .exe files in batch files any more

June 21, 2013 at 06:30:55
Specs: Windows 98, Pentium 3
I used to be able to run batch files with .exe files in them but suddenly, the message 'Cannot execute blah.exe' (where 'blah.exe' is the file I am starting to run) and then the batch file stops. What am I doing wrong?

Any help would be appreciated!

Simon


See More: windows 98 cannot execute .exe files in batch files any more

Report •


✔ Best Answer
June 24, 2013 at 14:28:04
None of the .exe files are running in windows? There is a utility for 98 called EXEFIX08 that can fix that. The old download links that google comes up with don't seem to be good anymore. But I have it on my computer and can email it if you need it. Let me know.


#1
June 21, 2013 at 10:08:47
Can you post an example of the simplest script you can lay your hands on please?

Always pop back and let us know the outcome - thanks


Report •

#2
June 21, 2013 at 14:41:28
Are you running the batch file from START--RUN on the desktop or a command prompt window? Can you run the .exe file from START--RUN even though it doesn't run in a batch file?

Report •

#3
June 22, 2013 at 04:11:20
Hi Derek,
Thanks for prompt reply. Simplest example is:
c:\windows\notepad.exe. This is in a file called TEST.BAT and executed by double-clicking the icon in Windows 98. MSDOS commands execute fine as do MSDOS .exe files. Only Windows-based .exe files do not now execute. I think that the registry is to blame as I did a registry clean up last week, and am reasonably confident that this is where the fault lies...

Thanks again


Report •

Related Solutions

#4
June 22, 2013 at 04:53:55
Hi Daveincaps

Thanks for the prompt reply. In my reply to Derek, I said that I simply used to double-click the .bat icon in Desktop (or run it via the Start Up folder). I am almost certain the problem lies in the registry, it having vbeen recently cleaned up. Any suggestions would be greatly appreciated.

Many thanks

Simon (from Scotland) AKA rdflg


Report •

#5
June 22, 2013 at 07:55:37
Registry cleaners (if that's what you mean) can often get things wrong.

You could try registry restore:
http://support.microsoft.com/kb/221512

Bear in mind that any programs you have installed after the date you select might have to be installed again.

Always pop back and let us know the outcome - thanks


Report •

#6
June 24, 2013 at 08:41:56
Hi Derek,
Thanks for that. I tried restoring the registry using a copy from several years ago, and still no joy. Scanreg /fix didn't work either. I'm loathe to reinstall Windows but may have to. Any other ideas would be greatly appreciated. It's strange that a Windows program will run if it is run directly but not if it is in a batch file - using START.EXE makes no difference as it elicits the error: 'Cannot execute START.EXE'

Simon AKA rdflg


Report •

#7
June 24, 2013 at 09:07:35
Hi Daveincaps
In answer to your question NOTEPAD.EXE will run fine via Start -> Run but not if it is in a batch file, when the error message: 'Cannot execute C:\WINDOWS\NOTEPAD.EXE'. I am at a loss to understand why... any thoughts would be greatly appreciated.

Simon
PS I'm thinking that it may not be the registry after all, but am not sure...


Report •

#8
June 24, 2013 at 12:50:13
That's really strange. I assume you are running your batch files in Windows. Do they also fail if you "shut down to MS-DOS" or "boot to command prompt only (true DOS using F8 when booting)". I'm only asking this in the vague hope that it might help our thinking.

Clutching at more straws, no chance that cmd.exe attributes are read only, hidden or system?

Can you copy a file to another location with a batch file?

Always pop back and let us know the outcome - thanks


Report •

#9
June 24, 2013 at 14:28:04
✔ Best Answer
None of the .exe files are running in windows? There is a utility for 98 called EXEFIX08 that can fix that. The old download links that google comes up with don't seem to be good anymore. But I have it on my computer and can email it if you need it. Let me know.

Report •

#10
June 24, 2013 at 16:11:49
Re #9

Apparently exe's run OK unless they are called with a batch file. That's what so odd about this one - never run into it before.

Always pop back and let us know the outcome - thanks


Report •

#11
June 24, 2013 at 16:22:43
Yeah, I reread everything and it appears that's not the problem. I was going by his # 3 where he says "Only Windows-based .exe files do not now execute" but then in # 7 he verifies that they run OK from START--RUN.

Report •

#12
June 24, 2013 at 16:38:55
Something I saw on a forum (similar problem).

For your notepad example, try this:
cmd /c c:\windows\notepad.exe

If it happens to work it would obviously be a workaround not a solution.


Report •

#13
June 28, 2013 at 05:36:01
Hello,
For those people interested in peculiar error messages, I have just found out something about Windows 98: if CONAGENT.EXE is damaged or accidentally deleted from the SYSTEM folder, Windows-based .EXE files will not run in batch files. The message 'Cannot execute C:\FOOBAR.EXE' appears. I found this out through loading another PC up with Windows 98, setting up a simple batch file to execute NOTEPAD.EXE, and then systematically moved the Windows files into a temporary folder until I was able to recreate the fault; it was nothing to do with the registry after all! I think that there is a moral here somewhere...
Yours smugly
Rdflg

Report •

#14
June 28, 2013 at 05:39:22
Hi Derek
Thanks for your thoughts and your help. They helped me to find the solution! It was all down to CONAGENT.EXE
Simon AKA rdflg

Report •

#15
June 28, 2013 at 05:42:57
Hi Daveincaps
Many thanks for your thoughts and suggestions. As I mentioned to Derek, who also gave me some very useful suggestions, it was down to CONAGENT.EXE mysteriously disappearing from the SYSTEM folder in Windows 98. Hopefully this will be of use to anyone else that runs into the same problem.
Simon AKA rdflg

Report •

#16
June 28, 2013 at 12:11:05
Glad to hear it and thanks for the very useful feedback.

Always pop back and let us know the outcome - thanks


Report •

#17
June 28, 2013 at 13:51:28
Yeah, that was a good catch. I googled that file name and this was one of the hits:

ftp://ftp.microsoft.com/MISC1/DEVELOPR/VISUAL_C/KB/Q126/0/31.TXT

It talks of problems running commands in Visual C++. The problem traces to the default.pif for the msdos prompt, especially running it from full screen or command prompt box. Conagent.exe apparently is the file that holds the configuration for the prompt.

I remembered quite awhile ago having similar problems with batch files that wouldn't run right from the box but did OK from full screen. I don't think I ever found a fix but I usually used full screen for anything dos-related anyway. The link jogged my memory of that and maybe it's related to your problem.

The link tells how to reset conagent.exe and/or change the msdos pif.


Report •

#18
June 29, 2013 at 04:31:20
Hi Daveincaps
Thanks for that. Yes, I was wondering what CONAGENT.EXE did. I'll read that link of yours now! All the best.
Rdflg

Report •

Ask Question