Question Locked

Login Script Error - 80070035 - Network Path Not Found

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to setup a logon script on SBS 2003 that maps users Home drives on their workstations. I verified the path is correct and yet still get the error. Any ideas?

Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUserName
strDriveLetter = "H:"
strRemotePath = "\\Amicuscuriae\users\%username%"
' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result H: drive
Set objNetwork = WScript.CreateObject("WScript.Network")
' Here is where we extract the UserName
strUserName = objNetwork.UserName
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
& "\" & strUserName
' Extra code just to add a message box
WScript.Echo " Launch Explorer, check: "& strDriveLetter
WScript.Quit
' End of MapNetworkDrive Example logon script.

9 replies

by Member 30634329

Does the error indicate what line of code produced the error, and can you show which line that is?
Also, how have you deployed this script? Is it in a Group Policy Object (GPO)? If so, is the logon script in the Computer Settings or User Settings section?

by jgreer

Its not deployed yet, just using on test machine. I need to get it deployed ASAP. I looked at the code on line 16 and it looks correct to me

by Member 30634329

I think the problem is that you defined the network path with the %USERNAME% DOS environment variable. The MapNetworkDrive API does not recognize this environment variable, so it is not substituting the actual user name. You will have to define your network path variable after you have the user name.

by rob miners

Open Server Management and navigate to Users. In the right hand pane you will see Configure My Documents Redirection. You will have 3 choices. I normally leave it set at the first choice.

In the Users account click on Profile and and make sure that the Connect radio button is selected. Allocate a Drive letter. EG: S and make sure that the Path is \\Amicuscuriae\users\username

The Users My Documents will now be redirected automatically at logon.

by jgreer

TrueBlue -- SBS has actually restricted access to our local MyDocument folders. I review the permissions and it sends them to their Home drives on the server, just doesn't map them.

by rob miners

setup properly the mapped drive should show up as S:
There is no need to change any local settings on My Documents. Check the User Accounts and make sure that they reflect the settings in my last post.

by jgreer

True -- Its setup as you described, only change is letter is set to H. No go though. Still not mapping the drive to H. I wish I could provide some screenshots to show you -- see if there is something else I am missing.

by rob miners

is first setup in the second stage with the Wizard you get an option to setup Client Apps and Users where you can change the location of these files. Default User Permissions are applied to these Folders.

On the Users Folder.
Domain Admins = Full control
Domain Users = Special Permissions
Folder Operators = Full control
System = Full control

Check the permissions on the Users folder.

This discussion is closed to new replies.