home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- WinInit
- -------
-
- by
- Tom Roberts
-
- WinInit will initialize the Windows 3.0 desktop
- from a list of applications and window sizes read
- from WIN.INI. Application windows will be moved
- to the specified position and size on the screen,
- and shown or iconized, as specified.
-
- Copyright (C) 1991, by Tom Roberts. All rights reserved.
- This program may be freely distributed by electronic or
- other means, as long as this copyright notice is preserved.
-
- Version 1.0, August 6, 1991
-
-
- WinInit is a simple Windows application to set up the initial desktop based
- upon a list of applications and window sizes read from WIN.INI. WinInit is
- expected to be executed only during Windows initialization, though it can
- be executed at any time. In keeping with its simplicity, WinInit must be
- manually installed, including manual editing of WIN.INI.
-
-
- INSTALLATION
- ------------
-
- To install WinInit, first copy the WININIT.EXE file to a convenient
- directory within Windows' PATH; the directory \WINDOWS may be used.
- In these instructions, \WINDOWS is assumed.
-
- Next, WIN.INI must be edited. This may be done using any text editor,
- including Windows Clipboard or System Editor. WIN.INI is normally located
- in the \WINDOWS directory (the System Editor will always find it for you).
- WIN.INI is divided into sections separated by lines of the form:
-
- [section-name] (starts in Column 1)
-
- Find the [windows] section; it is usually first. Look for two lines:
-
- load= (possibly followed by a list of programs)
- run= (possibly followed by a list of programs)
-
- Delete the list of programs on each of these lines, and add WININIT.EXE
- to one of them (use D:\path\WININIT.EXE, if necessary):
-
- load=WININIT.EXE (Program Manager will appear normally)
- OR
- run=WININIT.EXE (Program Manager will appear as an icon)
-
- NOTE: WININIT.EXE should appear ONLY ONCE in the "load=" and "run=" lines;
- the other line should not contain any programs. The choice of which line
- to use will determine how the Program Manager window is displayed during
- Windows startup, as described above. Basically, WinInit gives you better
- control over the automatic startup of Windows applications; it replaces
- the functionality of these two lines in WIN.INI.
-
- Now move to the END of WIN.INI. Add the following lines:
-
- [WinInit] (start in column 1)
- win1=1 0 0 250 300 clock.exe
-
- The first line introduces the section for WinInit. The second line tells
- WinInit to execute clock.exe, move it to a window with origin (0,0) and
- size (250,300) [units are pixels], and show it with ShowWindow state 1
- (which is SW_SHOWNORMAL - i.e. a normal window).
-
- Save the file WIN.INI to disk, and restart Windows. Windows should start up,
- and display the clock in the upper left corner of the screen. The Program
- Manager window should also appear, icon or normal, as selected above.
-
- If all is well, you can re-edit WIN.INI, placing whatever programs you wish
- into the WinInit section of WIN.INI. The format of WinInit lines is (note
- that "[]" indicate optional items - DO NOT type the brackets):
-
- win1 = Start X Y Dx Dy [D:\path\]command.exe [arguments]
-
- Where:
-
- win1 indicates the window to WinInit: win1 - win63.
- Start indicates the initial ShowWindow status:
- 1=normal, 2=icon
- X is the X coordinate of the upper left corner, pixels.
- Y is the Y coordinate of the upper left corner, pixels.
- (0,0) is the upper left corner of the screen;
- X increases to the right, Y increases down.
- Dx, Dy are the size of the window, in pixels.
- command.exe (plus optional drive and path) is the command.
- NOTE: You can use normal DOS .EXE and .COM programs,
- as well as Windows applications and .PIF files;
- DOS programs will only start up as icons, even if
- Start is 1. Windows will follow the DOS %PATH% to
- find the file. The extension, however, MUST be given.
- arguments are the optional arguments for the command.
-
- Commands will be executed in numerical order, not necessarily the order they
- appear in WIN.INI.
-
- Note that unless the command is a .PIF file, Windows will set its current
- directory to be the directory in which the program was found; this may help
- avoid using absolute pathnames in the arguments. For .PIF files, Windows
- uses the Start-up Directory field from the .PIF file.
-
- WinInit can be executed at any time; it will read WIN.INI and launch the
- programs listed, and then exit. As this is rarely (if ever) used, WinInit
- has no icon of its own.
-