Microsoft KB Archive/257996

= Error Message "The Current Directory Is Invalid" in Logon Scripts with Windows 2000 =

Article ID: 257996

Article Last Modified on 3/1/2007

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2

-



This article was previously published under Q257996



SYMPTOMS
Running commands in a logon script may return the following error message:

The current directory is invalid



CAUSE
By default, the current folder when you run a logon script or a command prompt is the Home folder. If this mapping is deleted by using the net use * /d command (which removes all mappings), or if the drive letter that is assigned to the Home folder is removed, the error message occurs.



RESOLUTION
To resolve this issue, use either of the following methods:
 * Add c: to the beginning of the logon script to change the current folder for the script to C:
 * Do not use the net use * /d command in your logon script.



STATUS
This behavior is by design.



MORE INFORMATION
Users can manually browse to the script and run the script, or they can map a drive to the drive that contains the script.

Note that clients that run Microsoft Windows 95 or Microsoft Windows 98 do not recognize the use * command, so that mapping also does not work on these clients.

Keywords: kberrmsg kbenv kbprb KB257996

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.