Discussion Locked

Running single instance of DOS program

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way to have a dos program run only one instance from an icon. There was a swithch for this in OS/2 and Windows3.11.

9 replies

by syscokid

One workaround would be to call teh program from a batch file that:

1. Checks for the existence of a flag file. If the flag file exists, it means the program is running, so you echo a message to the screen and quit.

2. If there is no flag file, create one.

3. Call the program

4. After the program exits, delete the flag file.

If you need complete syntax, let me know.

by ronnonf

You can start a 16 bit windows program with the '/separate' switcha nd that will run it in a separate section of memory from the other 16bit progs.

Try when you create the short open the properties and go to the memory tab. Check off "protected" that should do the trick.

by james_randy

Have it execute another DOS program which will delete the icon file from the decktop folder.

by tjc

the short answer is no. Windows and os/2 are multitasking operating systems that allow for more than one istance of a program. The first person who answered is the only way you can do a work around for this.

In a batch file that you run from an icon have it create file and then delete it when the program finishs. It is to only run the program if after checking for the existance of that file and not finding it let the dos program run.

This discussion is closed to new replies.