When I run a DOS based application, the DOS window appears on my screen then
disappears again. It runs on some computers (all XP) but not on others, with
the same problem. I have found people trying work around (like adding pause
to Batch Files) but as my app run another exe and isn't part of a batch file
this is no good. I need a solution. I'm guess it is to do with the
environment of windows, a setting somewhere that says whether DOS should
automatically close or stay on the screen until manually closed. Anyone got
any ideas? I'm completely spent on this issue...

Re: DOS Prompt Disappering by John

John
Mon Aug 18 09:13:48 PDT 2008

In the .pif file.

John

Echo Man wrote:

> When I run a DOS based application, the DOS window appears on my screen then
> disappears again. It runs on some computers (all XP) but not on others, with
> the same problem. I have found people trying work around (like adding pause
> to Batch Files) but as my app run another exe and isn't part of a batch file
> this is no good. I need a solution. I'm guess it is to do with the
> environment of windows, a setting somewhere that says whether DOS should
> automatically close or stay on the screen until manually closed. Anyone got
> any ideas? I'm completely spent on this issue...


Re: DOS Prompt Disappering by EchoMan

EchoMan
Tue Aug 19 02:46:52 PDT 2008

Thanks John, I had forgotten all about pifs!

Unfortunately didn't work (assume it should be _default in Win dir, I
unticked "Close on Exit" tick box). Maybe I need to tell you more...App is a
Self Extracting exe (32-bit windows), it extracts to temp and auto runs a
batch file. That batch file looks like -
@ECHO OFF
SET CFMC=
SET PATH=
CD CFMCDEMO
SET CFMC=.\
CALL SURVENT

After survent, the batch file then just deletes all the files and folders
after it.

When survent runs, this opens a new Command Prompt window, quickly runs (to
quick to see) and disappears (runs the program on the machines that work).

I have tried manually extracting the files and running the batch file from
the command prompt but it just says I am missing files (don't understand why
because it runs automatically on some computers from the same original zip
file).

Any clue? or am I failing in my logic? THANKS.


Re: DOS Prompt Disappering by John

John
Tue Aug 19 05:22:12 PDT 2008

If the application is a 32-bit Windows executable then it isn't DOS! In
which case you shouldn't be trying to launch it with a PIF file. For
future reference please keep in mind that there is no DOS at all in any
Windows NT versions (XP is NT 5.1). Windows NT systems are pure 32-bit
operating systems, on those systems 16-bit DOS legacy applications run
in a Virtual DOS Machine (NTVDM), 16-bit DOS applications use PIF files,
32-bit applications don't.

What you see when you run Cmd.exe may look like DOS but it isn't, it's
the native NT 32-bit CLI (Command Line Interpretor), 16-bit DOS
applications do not run from this CLI, the NT Virtual DOS machine has a
different CLI.

The CALL command launches a new batch file and when the end of the
called batch file is reached the control is returned to the first batch
file. You say that "After survent, the batch file then just deletes all
the files and folders after it", but you show no commands in the first
batch file after the CALL statement to SURVENT, we can only surmise that
the files and folders are deleted by routines in the SURVENT batch file,
look there for your answers.

John

Echo Man wrote:
> Thanks John, I had forgotten all about pifs!
>
> Unfortunately didn't work (assume it should be _default in Win dir, I
> unticked "Close on Exit" tick box). Maybe I need to tell you more...App is a
> Self Extracting exe (32-bit windows), it extracts to temp and auto runs a
> batch file. That batch file looks like -
> @ECHO OFF
> SET CFMC=
> SET PATH=
> CD CFMCDEMO
> SET CFMC=.\
> CALL SURVENT
>
> After survent, the batch file then just deletes all the files and folders
> after it.
>
> When survent runs, this opens a new Command Prompt window, quickly runs (to
> quick to see) and disappears (runs the program on the machines that work).
>
> I have tried manually extracting the files and running the batch file from
> the command prompt but it just says I am missing files (don't understand why
> because it runs automatically on some computers from the same original zip
> file).
>
> Any clue? or am I failing in my logic? THANKS.
>