Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!news From: dale@cec2.wustl.edu (Dale Frye) Newsgroups: comp.windows.ms Subject: Re: Exiting Windows to run programs Message-ID: <1991Mar15.170521.8881@cec1.wustl.edu> Date: 15 Mar 91 17:05:21 GMT References: <2613.27df8a27@incstar.uucp> Organization: Washington University, St. Louis MO Lines: 53 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