1

Windows 10 is resisting configuration of drive letters by a logon script calling net use.

The script is a .bat file and has been placed variously in:

  • c:\windows\system32\grouppolicy\user\scripts\logon
  • c:\programdata\microsoft\windows\start menu\programs\startup

The script fails in both cases:

  • after reboot and logon;
  • if run manually from their locations (whether at the command line or by double-click).

The script has several lines in the form of:

net use l:\ \\servername\data /persistent:no

When the script is run manually from the command line in a non-elevated command prompt, each line of the script throws the error:

System error 67 has occurred.
The network name cannot be found.

Nevertheless, each such line succeeds when manually run immediately thereafter in the same directory.

The question is how to get Windows to observe the script's configuration. Any constructive input would be much appreciated.

ebsf
  • 165

1 Answers1

1

I duplicated your error, and it comes from incorrect syntax in the command. I don't really understand why it works for you from the command prompt, since it didn't work for me.

The correct syntax is :

net use l: \\servername\data /persistent:no

The backslash after the drive-letter should be omitted.

harrymc
  • 498,455