INFO: Chaining Parent PSP Environment Variables

ID: Q96209


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT versions 3.1, 3.5, 3.51, 4.0
    • Microsoft Windows 2000


SUMMARY

Some MS-DOS-based applications change the environment variables of their parent application by chaining through the program segment prefix (PSP). With Windows NT, this functionality doesn't work if the parent is a Win32-based application.


MORE INFORMATION

When an MS-DOS-based application is started from a single command shell (SCS), the application inherits a new copy of the environment variables. Any attempts by the MS-DOS-based application to modify its parent's environment variables will not work. When the MS-DOS-based application exits, the SCS will be "restored" to its original state. If another MS-DOS-based application is started, the second application will receive the same environment that the first MS-DOS-based application received.

If an MS-DOS-based application (B) is spawned by another MS-DOS-based application (A), any modifications to application A's environment variables will be reflected when application B exits.

For more information on how environment variables are set, please see the following article(s) in the Microsoft Knowledge Base:

Q100843 Environment Variables in Windows NT

Additional query words: 3.10 3.50

Keywords : kb16bitonly kbnokeyword kbKernBase kbNTOS310 kbNTOS350 kbNTOS351 kbNTOS400 kbWinOS2000 kbDSupport kbGrpKernBase
Version : winnt:3.1,3.5,3.51,4.0
Platform : winnt
Issue type : kbinfo


Last Reviewed: January 11, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.