Error Message "The Current Directory Is Invalid" in Logon Scripts with Windows 2000 (257996)



The information in this article applies to:

  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Server SP2
  • Microsoft Windows 2000 Advanced Server SP1
  • Microsoft Windows 2000 Advanced Server SP2
  • Microsoft Windows 2000 Professional SP1
  • Microsoft Windows 2000 Professional SP2

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.

Modification Type:MajorLast Reviewed:12/3/2003
Keywords:kbenv kberrmsg kbprb KB257996