Lunching dotnet application from batch file in windows 98

  • Thread starter Thread starter Chris Turner
  • Start date Start date
C

Chris Turner

Does anyone know a way of executing a dotnet application from a windows
98/ME batch file?

At the moment I get 'Bad command or filename' everytime I try to run
something.

Also, I'd like the execution to wait until the application has finished
before moving onto the next batch instruction.

Thanks in advance,
Chris.
 
'Bad command or filename' this has nothing to do with the fact that
the app you are trying to start is a .Net exe, you can execute .Net
exe's just lke normal exes provided the .Net framework is installed.
Make sure the directory for the exe is present in the PATH
environment variable.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

And that you put quotes around paths with spaces in them - .bat files
treat spaces as de-limiters.
 
I already have quotes around the full path of the executable file and the
same batch file is used on Win98, WinME, WinNT, Win2K, and WinXP. The only
time I get 'Bad command or filename' is when the batch file executes my
dotnet app in Win98 and WinME. Does anyone have a solution for this?

Regards
Chris
 
I already have quotes around the full path of the executable file and
the same batch file is used on Win98, WinME, WinNT, Win2K, and WinXP.
The only time I get 'Bad command or filename' is when the batch file
executes my dotnet app in Win98 and WinME. Does anyone have a
solution for this?

Regards
Chris

This might be a stupid question but is the NET FW installed on the
98/ME machine (Sijin did mention this).
 
Also, If I try to run the application using the run option from the menu, it
works perfectly, just not from a batch file.

Has anyone tried to reproduce the problem and got it to work?
 
I've managed to solve the problem by using the 'START' batch file command
with a 'NOWAIT' option.
 
Also, If I try to run the application using the run option from the
menu, it works perfectly, just not from a batch file.

Has anyone tried to reproduce the problem and got it to work?

I don't run W98 but by a process of elimination if the app runs when
you double click the .exe from Explorer it must be down to the batch
file.

Have you tried a batch file to run something simple like Notepad? If
that works then it surely must be down to a typo in the batch file? If
it doesn't then there's something weird going on - I wonder if a W98
group might be more helpful to you, don't know that many people in this
group still use it?
 
Executing exe from batch file

@echo off
REM - Simple example of batch file
setlocal

call C:\path\your.exe
pause

call C:\path\your.exe
pause

endlocal


I hope this helps

Hemant - Maryland US
 
Back
Top