
              Utility Program to Start Windows 3.0 Applications
              -------------------------------------------------

Program:    WINRUN.EXE

Features:   Ability to Set Windows Application Startup Directory
            Ability to Set Initial Startup Display Mode of Application


Background Info:
----------------

To change the default working directory for a Windows Application (WinAp)
you can use file properties and specify the startup directory as the
source for the WinAp you want to run, but you must specify the path
for the WinAp in the PATH environment variable.  For example, to start
Excel in C:\BUDGET you would specify C:\BUDGET\EXCEL.EXE as the command
line and make sure that the PATH variable has C:\EXCEL within it.

Problem:
--------

The problem with this approach is that the PATH variable begins to suffer
from overload (too many paths).  To get around this, write a program called
WINRUN.EXE as follows and place it in a directory already included in your
PATH such as WINDEV or WINDOWS.

Solution:
---------

/*
**  Actual WINRUN.C has code for parsing command line option.  See WINRUN.C
*/

int PASCAL WinMain
  ( HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
  {
  return WinExec( lpCmdLine, nParam );
  }

Now, to use the above example, set the command line in file properties to:

    C:\BUDGET\WINRUN.EXE C:\EXCEL\EXCEL.EXE

Results:
--------

You never have to change the PATH variable again.  Hopefully, the next
version of Windows will ask for the startup directory as a separate
selection within file properties.  Also, it would be helpful to be able
to set the startup mode.

Other Options:
--------------

In order to change the startup display mode of a Windows 3.0 application
you can use the alternate form of WINRUN.

    {directory}WINRUN -option normal_command_line

Option Paramater:

    STD     Activates the window with default display mode (nCmdShow).

    MIN     Activates the window and displays it as iconic.

    MAX     Activates the window and displays it as a maximized window.

Example:

    C:\BUDGET\WINRUN.EXE -MAX C:\EXCEL\EXCEL.EXE

    would result in:

        Startup Directory:  C:\BUDGET

        Display Mode:       EXCEL.EXE would be activate and screen maximized


Author:
-------
Granted, I didn't actually write any code to build this application, but I
did figure it out.  So for that simple act, I will accept credit.

Bob Duffett
Priority Software, Inc.
P.O. Box 5548
Athens, GA  30604

(404) 548-4039 Voice
(404) 543-7250 FAX
(404) 543-3162 MHS Hub (PSI-GA)

