[Toc][Index]

START - Start a program in another session

 
 Purpose:    Start a program in another session or window. 
             
 Format:     START ["program title "] [/B[G] /C /DOS[=optfile ] /F[G] /FS 
             /I /ICON=iconfile /INV /K /L /LA /LD /LH /MAX /MIN /N /PGM 
             progname /PM /POS=x,y,width,height /WAIT /WIN /WIN3[=optfile 
             ] /WIN3S[=optfile ]] [command ] 
             
             program title :  Title to appear on title bar. 
             optfile :  Option settings file. 
             iconfile :  Name of icon (.ICO ) file. 
             progname :  Program name (not the session name). 
             path :  Startup directory. 
             command :  Command to be executed. 
             
             /B[G] (background session)      /LH (local history list) 
             /C(lose when done)              /MAX(imized) 
             /DOS (DOS session)              /MIN(imized) 
             /F[G] (foreground session)      /N(o command processor) 
             /FS (full screen)               /PGM (program name) 
             /I(nherit environment)          /PM (PM application) 
             /ICON (.ICO file)               /POS(ition of window) 
             /INV(isible)                    /WAIT (for session to finish) 
                                             
             /K(eep when done)               /WIN(dowed session) 
             /L(ocal lists)                  /WIN3 (Windows enhanced mode) 
                                             
             /LA (local aliases)             /WIN3S (Windows standard 
                                             mode) 
             /LD (local dir history)         
 
 See also:  DETACH. 
 Usage 
 START is used to begin a new OS/2 session, and optionally run a program 
 in that session.  If you use START with no parameters, it will begin a 
 new command-line session.  If you add a command, START will begin a new 
 session or window and execute that command. 
 The program title, if it is included, will appear on the title bar, and 
 on the Presentation Manager window list.  The program title must be 
 enclosed in quotation marks and cannot exceed 60 characters.  If the 
 program title is omitted, the program name will be used as the title. 
 START always assumes that the first quoted string on the command line is 
 the program title; if there is a second quoted string it is assumed to be 
 the command.  As a result, if the name of the program you are starting is 
 a long filename containing whitespace (and must therefore be quoted), you 
 cannot simply place it on the command line.  If you do, as the first 
 quoted string it will be interpreted as the program title, not the 
 command.  To address this, use the /PGM switch to indicate explicitly 
 that the quoted string is the program name, or include a title before the 
 program name.  For example, to start the program "C:\Program 
 Files\Proc.Exe" you could use either of the first two commands below, but 
 the third command would not work: 

 
         [c:\] start /PGM "C:\Program Files\Proc.Exe"
         [c:\] start "test" "C:\Program Files\Proc.Exe"
         [c:\] start "C:\Program Files\Proc.Exe"
 
 
 START offers a large number of switches to control the session you start. 
  In most cases you need only a few switches to accomplish what you want. 
  The list below summarizes the most commonly used START options, and how 
 you can use them to control the way a session is started: 
        /MAX, /MIN, and /POS allow you to start a character-mode windowed 
        session in a maximized window, a minimized window, or a window 
        with a specified position and size.  The default is to let the 
        operating environment choose the position and size of the window. 
        /C allows you to close the session when the command is finished 
        (the default for DOS and OS/2 Presentation Manager sessions); /K 
        allows you to keep the session open and go to a prompt (the 
        default for OS/2 character mode sessions). 
        /BG and /FG allow you to start the session in the background(does 
        not respond to keystrokes until selected) or foreground (responds 
        to keystrokes until deselected).  /FG is the default if /DOS, /FS, 
        /WIN, or /PM is used; otherwise, /BG is the default. 
        /FS and /WIN control whether a character-mode session is started 
        in full-screen or windowed mode.  The default is to start a 
        session of the same type as the current session, if the 
        application can be run in such a session. 
 START determines the application type automatically and starts the 
 session in the appropriate mode. 
 START gives you some flexibility in determining the session mode. For 
 example, if the command is the name of a batch file (either a .BTM or 
 .CMD file), you can use the /FS or /WIN options to run the batch file as 
 part of a new session in either full-screen or windowed mode. 
 However, you cannot start a session in a mode that is inappropriate for 
 the application type.  A DOS application cannot be run as part of a 
 Presentation Manager session, for example, even if you use the /PM 
 switch.  Invalid or conflicting options will be ignored. CMD.EXE will 
 always attempt to run the command in the appropriate type of session. 
 If the program is a DOS application or .BAT file, CMD.EXE will start a 
 new DOS session to run it.  The DOS session will close itself 
 automatically as soon as the program or batch file ends, unless /K is 
 used.  If you want the session to wait for a keystroke before it closes 
 itself, you can use this syntax (assuming 4DOS is your command processor 
 for OS/2 DOS sessions: 

 
         [c:\] start /DOS command ^^ pause
 
 
 (Because the caret [^] is the default CMD.EXE escape character, two 
 carets must be used in order to pass one on to 4DOS as a command 
 separator.) 
 If you want to start a DOS command-line session in OS/2, you can use the 
 command: 

 
         [c:\] start /DOS
 
 
 You can specify settings for DOS and Windows sessions by using a settings 
 options file, and loading it with the /DOS=, /WIN3=, or /WIN3S= option. 
  This allows you to start DOS and Windows sessions with specific settings 
 without creating a desktop object and modifying the settings manually. 
  Before using this capability you should read the description of it under 
 /DOS= (below) very carefully, since errors in the settings file can 
 occasionally hang your system. 
 Options 
    /BG:        (BackGround session) The session is started as a 
                background session.  /BG may be abbreviated to /B. 
    /C:         (Close) The session or window is closed when the 
                application ends. 
    /DOS[=filename]:
                ( DOSsession )StartaDOSsession .
                If you include the =filename, OS/2 will load DOS settings 
                from the specified file.  When you use /DOS you can also 
                alter the DOS settings for a session with environment 
                variables of the form DosSetting.name=value, without using 
                a settings file. 
                Starting a session with specific DOS settings is an 
                undocumented feature which was implemented within OS/2 
                with little error checking.  It is included in START 
                because it substantially eases a complex task, but you 
                must experiment carefully to ensure that the settings you 
                select will work properly on the systems on which you plan 
                to use them.  Incorrect settings may be ignored, but they 
                may also hang your session or stop the entire system.  Be 
                sure your experiments are not conducted while critical 
                tasks are in process. 
                Each line in the file must have a name, an equal sign [=], 
                and a value.  The names are those shown in OS/2's DOS 
                Settings dialog box.  Do not use spaces on either side of 
                the equal sign. 
                The names in the DOS Settings dialog box will vary 
                depending on the device drivers and other settings in your 
                CONFIG.SYS file, though many are available on all systems. 
                 You must ensure that the names you use are valid for the 
                systems on which you use them.  For example, if you 
                replace IBM's COM.SYS and VCOM.SYS with different 
                communications drivers, the COM_ settings will probably 
                not be valid for the new drivers.  If you have a settings 
                file which contains settings defined by a particular 
                driver, and use it on a system where the corresponding 
                driver is not loaded, the results are undefined. 
                The values in your settings file must be numeric for 
                settings which show a numeric value under DOS Settings 
                (e.g., DOS_FILES=30), and must be text strings for 
                settings shown with a string (e.g., DOS_SHELL=C:\4DOS.COM 
                C:\4DOS /P).  Strings should be entered without trailing 
                blanks.  For values shown as multiple choice on the DOS 
                Settings page you must specify a numeric value, typically 
                0 for Off and 1 for On (e.g., DOS_HIGH=1).  Items with 
                choices other than Off and On may use different values, or 
                may not work at all; experimentation is usually required 
                to find out what works.  Attempting to use strings for 
                choice items (e.g., DOS_HIGH=ON) will not work, and can 
                hang your system.   This is due to the internal operation 
                of OS/2, and is not a problem in CMD.EXE. 
                A typical DOS settings file might look like this: 

                
                        DOS_FILES=30
                        DOS_HIGH=1
                        DOS_SHELL=C:\4DOS\4DOS.COM C:\4DOS /P
                        MOUSE_EXCLUSIVE_ACCESS=0
                        VIDEO_FASTPASTE=1
                
                
                You can include comments in a settings file by beginning 
                any line with a colon [:]. 
                When you use /DOS you can also alter the DOS settings for 
                a session with environment variables, without using a DOS 
                settings file.  When the =filename portion of the switch 
                is not used, OS/2 will scan the environment looking for 
                variables of the form DosSetting.name=value.  Each such 
                variable entry will be used to set the DOS setting with 
                the specified name to the specified value.  All of the 
                cautions and restrictions given above for settings stored 
                in a file apply equally to settings stored in environment 
                variables. 
                Settings stored in environment variables are "global" and 
                apply to all sessions started with START /DOS, except when 
                an explicit settings file is specified with =filename. 
    /FG:        (ForeGround session) Start the session as the foreground 
                session.  /FG may be abbreviated to /F. 
    /FS:        (Full Screen) Start the session as a full-screen session. 
    /I:         (Inherit environment) Inherit the default environment 
                specified in CONFIG.SYS, if any, rather than the current 
                environment. 
    /ICON=filename :
                Usethespecifiediconfile .  Ifyoudon ' tuse/ ICON 
                ,thedisplayediconwillbetheonefoundorassignedbyOS / 2 .
    /INV:       (Invisible) Start the session or window as invisible.  No 
                icon will appear and the session will only be accessible 
                through the Task Manager or Window List. 
    /K:         (Keep session or window at end) The session or window 
                continues after the application program ends.  Use the 
                EXIT command to end the session. 
    /L:         (Local lists) Start CMD.EXE with local alias, history, and 
                directory history lists.  This option combines the effects 
                of /LA, /LD, and /LH (below). 
    /LA:        (Local Alias list) Start CMD.EXE with a local alias 
                list.See ALIAS for information on local and global 
                aliases. 
    /LD:        (Local Directory history) Start CMD.EXE with a local 
                directory history list.  See Local and Global Directory 
                History for more information. 
    /LH:        (Local History list) Start CMD.EXE with a local history 
                list. See Command History and Recall for information on 
                local and global history lists. 
    /MAX:       (Maximized) Start the session or window maximized. 
    /MIN:       (Minimized) Start the session or window minimized. 
    /N:         (No command processor) Start an OS/2 program directly, 
                without a command processor.  The command cannot be an 
                internal command or batch file.  This is the default for 
                PM applications. 
    /PGM:       (Program name) The string following this option is the 
                program name.  If you do not use /PGM, the first quoted 
                string on the line will be used as the session and task 
                list title, and not as the program name. 
    /PM:        (Presentation Manager) Start a program in the Presentation 
                Manager session. 
    /POS:       (Position) Start the window at the specified screen 
                position.  The syntax is /POS=x, y, width, height where 
                the values are specified in pixels or pels.  x and y refer 
                to the position of the top left corner of the window 
                relative to the bottom left corner of the screen. 
    /WAIT:      Wait for the new session or window to finish before 
                continuing.  Cannot be used with /WIN3 or /WIN3S. 
    /WIN:       (Windowed) Start the session in a window. 
    /WIN3[=filename]:
                ( Windowsenhancedmode )Runtheprograminanenhanced - 
                modeWindows3 . xsession .  Thesessionwillrunseamless( 
                ontheOS / 2desktop ) .  TostartaWindowsapplicationinfull - 
                screenmode ,use/ FSratherthan/ WIN3 .  You
                can
                include
                an
                equal
                sign
                and
                the
                name
                of
                an
                options
                filetosetoptionsforthespecificsessionandapplication( see/ 
                DOS =abovefordetails ) .
    /WIN3S[=filename]:
                ( Windowsstandardmode )Equivalentto/ WIN3 
                ,butrunstheprograminstandardmoderatherthanenhancedmode .
 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs