[comp.windows.ms] Exiting Windows 3 after application

bgonderm@nmsu.edu (Bryan Gondermger) (11/06/90)

We have four PC's (each with a copy of Windows 3 on the local hard
drive) connected to a network and running a menu program.  When using
Windows applications (PageMaker and WORD for Windows in particular),
which are on the network, we set up the menu software to execute the
following command:

win -r w:winword

This works OK - WORD for Windows is loaded and operates properly.  The
"problem" is that when the user exits WORD, they are returned to
Windows and not DOS (and the menu program).  Is there some way to make
Windows automatically exit after an application (specified from the
command line) is terminated?

Thanks,
Bryan Gonderinger (bgonderm@nmsu.edu)

--
 _____________________________________________________________________________
|                 Bryan Gonderinger     bgonderm%nmsu.edu                     |
|               Network Programming     Box 30001, Dept. 3AT                  |
|    Computer Center, Small Systems     Las Cruces, New Mexico                |
|       New Mexico State University     88003                                 |
|_____________________________________________________________________________|

risto@tuura.UUCP (Risto Lankinen) (11/07/90)

bgonderm@nmsu.edu (Bryan Gondermger) writes:
> ... following command:

>win -r w:winword

>This works OK - WORD for Windows is loaded and operates properly.  The
>"problem" is that when the user exits WORD, they are returned to
>Windows and not DOS (and the menu program).  Is there some way to make
>Windows automatically exit after an application (specified from the
>command line) is terminated?

Hi!

A sort-of-a-cure to this 'problem' is to make the Winword the shell of a
Windows session.  This is done by modifying the SYSTEM.INI under the "boot"
section tag line 'shell=progman.exe'.  Change it to read 'shell=winword.exe'

The drawback is that the other Windows programs are not available, unless the
new shell is capable of running them.  Well, Winword can do that using macros
(or the Run... option in case of Control Panel, Clipboard, etc.), but another
drawback is to have multiple SYSTEM.INIs or change the one each time when
different Windows program is being run.

By the way, why don't you use the Windows' Program Manager instead for
the 'Choose-a-program-to-run' ?  It *can* do DOS apps, too, if that's the
problem.

Terveisin: Risto Lankinen
-- 
Risto Lankinen / product specialist ***************************************
Nokia Data Systems, Technology Dept *  2                              2   *
THIS SPACE INTENTIONALLY LEFT BLANK * 2 -1 is PRIME!  Now working on 2 +1 *
replies: risto@yj.data.nokia.fi     ***************************************

jcmorris@mwunix.mitre.org (Joe Morris) (11/07/90)

In a recent article bgonderm@nmsu.edu (Bryan Gondermger) writes:
>We have four PC's (each with a copy of Windows 3 on the local hard
>drive) connected to a network and running a menu program.  When using
>Windows applications (PageMaker and WORD for Windows in particular),
>which are on the network, we set up the menu software to execute the
>following command:
>
>win -r w:winword
>
>This works OK - WORD for Windows is loaded and operates properly.  The
>"problem" is that when the user exits WORD, they are returned to
>Windows and not DOS (and the menu program).  Is there some way to make
>Windows automatically exit after an application (specified from the
>command line) is terminated?

You can do this (call it "run-time Windows simulation") by the following:

1. Create a new directory called \winwfw  (this doesn't *have* to be distinct;
   it could be your WfW normal directory.  Just so long as it isn't
   part of Windows 3 itself).

2. Copy the following files to the new directory from your Windows directory:

    win.com
    win.ini
    system.ini

3. In the new directory modify the [boot] section of 'system.ini' by
   changing the shell= line to point to the one-and-only program you
   want to run.  The original line should read:

   shell=progman.exe

   and the modified line in your case would be:

   shell=w:\winword.exe

   Remember to type the complete fileid of the program to be executed,
   including the '.exe' suffix.  I tried this technique as I wrote this note,
   and was rudely reminded of this by Windows when I just said 'excel'.

4. To execute the dedicated Windows session just put the new directory ahead
   of the normal Windows directory in your path and issue the 'win' command.

What we're doing here is making Windows think it's running on a network
where the actual executable files, fonts, etc. are on a network server, and
only the basic control files (and win.com) are on the user's local disk.

Note that this technique isolates any changes in WIN.INI and SYSTEM.INI made
in the dedicated task from any changes made in normal Windows; this may or
may not be desirable.  If you need to keep the two flavors of Windows in
sync you'll have to provide an outboard copy function to refresh the
files.

Joe Morris