Im not sure if qbasic is what i should be using for this. I want to make a network bootdisk that will give you choice as to what NIC card you have. I just need the program to run my menu. Then it needs to run a few dos files. I just dont know how to make a qbasic program run a dos file. what would be the code to run dos files from a qbasic program?
example IF NIC% = 1 THEN (HERES WHERE I NEED IT TO RUN A .COM OR .EXE FILE)
thanks
DOS bootdisk - qbasic menu
If all you're asking is how to run a DOS application from QBasic, then pretty much the only thing you need to know about is the SHELL command.
Syntax:
Example:
Alternatively, you could consider creating a batch file (*.bat) instead... To do so, open up your favorite simple text editor (Notepad, preferably) and type in the following psuedo-code:
...And then save it with a .BAT extention. The file will execute the same way that an .EXE or .COM file would. However, if what you need is more than just executing a DOS application (or the other few things that a batch file can do), then I wouldn't recommend this method at all. Of course, you could always combine both methods, as well:
Syntax:
Code: Select all
SHELL [commandstring]
Code: Select all
SHELL "C:\MyApp.Exe"
Code: Select all
@ECHO OFF
ECHO Running MyApp...
C:\MyApp.Exe
- Create a batch file that displays some common text & runs a program
- Open QBasic
- Wherever within your program that you need to, type in the psuedo-code: SHELL "C:\MyApp.bat"
Hey... ever get that feeling of DejaVu?
Whenever I do, I stop and think,
"Hey... ever get that feeling of..." Hey...
Whenever I do, I stop and think,
"Hey... ever get that feeling of..." Hey...