home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
wpj_mag
/
wpjv1n5.zip
/
WINSTUB.ZIP
/
WINSTUB.CPP
next >
Wrap
C/C++ Source or Header
|
1993-04-29
|
655b
|
29 lines
// Enhanced WINSTUB.EXE for Windows applications
#include <process.h>
#include <stddef.h>
#include <iostream.h>
char answer;
int returncode;
int main(void)
{
cerr << "\nThis program requires Microsoft Windows to run.";
cerr << "\nWould you like me to start Microsoft Windows for you? ";
cin >> answer;
if (answer == 'y' || answer == 'Y')
{
returncode = spawnlp(P_WAIT,"win.com","","address",NULL);
if (returncode<0)
{
cerr << "\n\nError, could not start Microsoft Windows.";
cerr << "\nExiting back to DOS...";
}
}
else
cerr << "\n\nExiting back to DOS...";
return returncode;
}