Q51768: spawn Ignores arg0 with DOS 3.00 and Later
Article: Q51768
Product(s): See article
Version(s): 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | S_QuickC S_QuickASM | mspl13_c
Last Modified: 16-JAN-1990
Question:
Why is arg0 ignored when I use a spawn command under DOS?
Response:
Under DOS Versions 3.00 and later, the first argument (arg0) is used
to hold the path and name of the program. The third parameter in a
spawn command is arg0. Regardless of what you specify arg0 to be, DOS
passes the path and name of the program to the child function. Under
DOS 2.x, arg0 is not defined.
Under OS/2, this is not the case; arg0 is passed as specified with the
spawn command.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.