When running your logon script, you receive:

The current directory is invalid.

The default current folder for a CMD prompt or logon script is the Home folder. If the mapping to the Home folder is deleted, this error will occur.

If your logon script contains net use * /d, you have deleted the mapping.

If you must use the net use * /d command in your script, make the first statement in your script:

C: