Windir Environment Variable Lost if Batch File Run from *.PIF

ID: Q148948


The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5, 3.51
  • Microsoft Windows NT Server versions 3.5, 3.51


SYMPTOMS

When you run a batch file from a *.PIF file on a Windows NT computer, the environment variable "Windir" is not retained in the environment. Some applications make use of this variable, and it is normally available in the Windows NT environment. If it is not available, the application may fail.


RESOLUTION

At the beginning of the batch file, place an entry that reads:

SET windir=%systemroot%

This restores the variable to the environment.

Additional query words: prodnt

Keywords : ntconfig
Version : 3.50 3.51
Platform : WINDOWS
Issue type :


Last Reviewed: February 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.