[comp.windows.ms] Exiting Windows to run programs

adams@incstar.uucp (03/14/91)

Is there a way to set up an icon to exit windows, run a program (or bat
file) and reenter windows?  The program we are trying to run will not run
from an icon under windows because there is not enough memory...
Thank you.
Heidi
adams%incstar@uunet.uu.net

dale@cec2.wustl.edu (Dale Frye) (03/16/91)

In article <2613.27df8a27@incstar.uucp> adams@incstar.uucp writes:
>Is there a way to set up an icon to exit windows, run a program (or bat
>file) and reenter windows?  The program we are trying to run will not run
>from an icon under windows because there is not enough memory...

To do this I :

1: got a copy of EXITW from Dragons Eye Software. He modified it for me
   so it would set an enviroment variable. This program exits Windows.

2: wrote a batch file for win that uses this variable to run the software


Another advantage of this is the ability to prevent someone from trying
to run win from within windows.

Dragons Eye Software     817 265-5619

Here's my batch file for win.bat:

@echo off
if "%win%"=="yes" exit
:winloop
h:
cd \dos
set TEMP=d:\
call setdummy
set wexit=default
set win=yes
c:\win\win
set win=no
:go get the variable set when exitw left windows
p:\bat\exitwdos d:\exitw.dat > nul
cls
del d:\exitw.dat > nul
if %wexit%==default set wexit=logout
if %wexit%==logout call logout
if %wexit%==acad10 call acad10
if %wexit%==acad11 call acad11
if %wexit%==dos goto end
goto winloop
:end
:cls
echo To restart Microsoft Windows type "win".
echo You are still logged into the Sun system.  Your files are on H:
echo Be sure to logout when you are done.  To logout type "logout".
h:
cd \dos
cd c:\

Dale Frye
Washington University in St. Louis
dale@cec2.wustl.edu

gpsteffl@sunee.waterloo.edu (Glenn Patrick Steffler) (03/18/91)

In article <2613.27df8a27@incstar.uucp> adams@incstar.uucp writes:
>Is there a way to set up an icon to exit windows, run a program (or bat
>file) and reenter windows?  The program we are trying to run will not run
>from an icon under windows because there is not enough memory...


The program win.com allows re-entry when the global return value from
the last windows executable left (kernel.exe/krnl286.exe/krnl386.exe I
believe) is something er other.  Microsoft would be your best bet.  By the
way, this should be in comp.windows.ms.programmer as well, but I decided
to only reply here.

>Thank you.
>Heidi
>adams%incstar@uunet.uu.net

-- 
Co-Op Scum                            "Bo doesn't know software" - George Brett

"The galaxial hearth steams the sea as the sky blood red embrasses darkness"
-John Constantine (HellBlazer)                          Glenn Steffler