VOGONS


First post, by amadou

User metadata
Rank Newbie
Rank
Newbie

Hello

I'm running a Win 98SE machine with real hardware (no virtual machine, no emulation).
I'm trying to run some DOS games using .BAT (batch) script.
All games in question are DOS application but run fine on Win 98.
If i double click on the appropriate icon games run without any problem.
I can also sun the games in question from "Run" command line ("win+R" shortcut) using a command like this

"C:\games\gameInQuestion.exe"

without any problem.

Applications can't run from command prompt in any case (I get errors)

My problem is that I'm unable to run the same applications from a batch script.
I try:

start "C:\games\gameInQuestion.exe"

and I always get an error. The error is different every time, but mainly application refuse to run because application can't "load" some component (different for every application).
I always double-check for the "missing component" and I always find it on the appropriate directory.
So I'm quite confused...
It looks that when I double click on icon or shortcut Win98 trigger the application on a different way that when I try to run the application via .BAT (batch) script.

Any Ideas? Do I have to add something more to my .BAT (batch) script?

Reply 1 of 10, by konc

User metadata
Rank l33t
Rank
l33t

In your batch file, try to CD to the directory before calling the exe.
cd c:\games
start...

Reply 2 of 10, by amadou

User metadata
Rank Newbie
Rank
Newbie

Thank you for your answer. I already try every possible combination.
It just doesn't work. The problem is not the change of directory.
The game I try to launch starts as expected, the problem is that I always get an error.

As I continue my research, I just try a VBS script. Unfortunately I get the same errors also with VBS script.

Reply 3 of 10, by myne

User metadata
Rank Oldbie
Rank
Oldbie

You don't need the start command from dos.

CD gamedir
Game.exe

That should be it.

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 4 of 10, by amadou

User metadata
Rank Newbie
Rank
Newbie

Thank you for your answer. I already try it.
Always get errors. I try every possible combination.
Application start but brake to error (mainly "missing file")
From the 6 games I try, only one (a very simple free games) works, everything else brake to error.

Reply 5 of 10, by myne

User metadata
Rank Oldbie
Rank
Oldbie

What error?
What games?

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 6 of 10, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Alas, the only running Win98 system I have left is VMware , but it does seem
reasonable like real hardware in many cases.

I agree than "myne" is probably going to "C:\games"
before launching "GameInQuestion.EXE"

First steps, get to a command prompt try:
> C:
> cd C:\games
> GameInQuestion
before you can run something from a .BAT you will need to know
exactly how to launch it from a command line.

"START" says it launches a "Windows" or "MS-DOS" program.
I don't know how much it "looks at" what it's trying to run,
I'd try dropping "start" and let the batch file reside in memory
while the game runs.

There are also some options to "START" to select things
like Background/Foreground and if START returns immediately
(started program runs in separate execution incidence) or
after the program runs (which is what you normally happpen
if you just enter the program name at the command prompt).

It might really help if you described "an error" in more detail!

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal

Last edited by DaveDDS on 2024-07-29, 13:25. Edited 1 time in total.

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal

Reply 7 of 10, by amadou

User metadata
Rank Newbie
Rank
Newbie

@DaveDDS
As I already mention, I'm able to run some DOS games (not commercial though, mainly freeware) using my script.
Also using the exact same script I'm able to run every native windows application I try, so I really don't thing that the script has errors.
Maybe there are more elegant or safe solutions but my script works (at least with some applications in DOS and with every Win application )

@myne
Many games and many errors... Every game a different error mainly "missing components"
I don't think that the problem is "games" or "errors"
I mention that I can run "some" DOS games and all WIN applications I try.
Also all games I try works perfectly since I'm able to run them via double click or "rum command line" (although runing from command prompt doesn't work) .
So I think that I miss a command in my script to trigger the DOS environment...
I also try VBS without success, I get the same errors.

TEMPORARY SOLUTION:
I find a automation application called "Autoit". A very old version (autoit-v3.2.12.1) runs perfectly on WIN98
After reading instructions manual for a few minutes I was able to imitate some simple keystroks (press WIN key + "R" key, paste the "C:\games\GemeInQuestion.exe" command and press "Enter")
Just 3 lines of code and works perfectly !
Not an elegant solution , not what I was looking for but at least now it works...

Reply 8 of 10, by myne

User metadata
Rank Oldbie
Rank
Oldbie

Show one of your batch files.
Show one of the errors.

I'm betting you're running it from whatever current directory you're in and not cding to the folder first.

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 9 of 10, by amadou

User metadata
Rank Newbie
Rank
Newbie

@myne
Yes you're right, finally it was a directory problem.
Since I was using "absolute" directory I was thinking that, it was enough (and it was for all WIN applications and a few DOS games...)

I try to run a simple one line script from the same directory as the DOS game using only a "run" line of code (e.g. "game.exe") and works fine.
So now it is possible to do what I'm looking for crafting the code.

Reply 10 of 10, by myne

User metadata
Rank Oldbie
Rank
Oldbie

It's really not possible to one line it in traditional dos.

Here's a basic generic bat that should work with any game.

C:\
CD gamedir
Game.exe

That's it. If it's on d:, use that. If it's in the games folder put CD games\gamedir

In modern cmd a one liner can happen
CD /d c:\games\gamedir && game.exe
But /d and && aren't in dos dos

If you want some more advanced ideas, take a look at the last link in my sig, or even the 3.11 template's scripts.

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic