Link to home
Start Free TrialLog in
Avatar of IT2Dr
IT2Dr

asked on

Mapped drives on xp

I have a client with Server 2008 r2 and 10 workstarions with Win 7 and XP. 2 of the xp machises will not hold the mapped drives. These are simple maps to a fileserver supporting dental practice applications. One of the machines will hold 1 of 2 maps and the other will not hold either on reboot.
I do not have scripts on the local or server yet. As stated, 8 of the machines work fine, does not seem to be server issue.
There is a domain, maps are lost on reboot but are not auto disconnected while logged on.
Avatar of Kruno Džoić
Kruno Džoić
Flag of Croatia image

try command line:

net use z: \\share /persitent:yes
As it is only 2 machines you could always add the following script into their startup to ensure that the drives does get mapped:
Option Explicit
Dim objNetwork, objShell 
Dim strDriveLetter, strRemotePath, strUserName

strDriveLetter = "U:" 
strRemotePath = "\\YOURSERVERNAME\YOURNETWORKDIRECTORY\" 

Set objNetwork = WScript.CreateObject("WScript.Network") 

On Error Resume Next

strUserName = objNetwork.UserName 
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath & strUserName
objNetwork.MapNetworkDrive "S:" , "\\scends01\IEMASDfs\Centurion Public Data"

WScript.Quit

Sub ShowExplorer()
Set objShell = CreateObject("WScript.Shell") 
objShell.run ("Explorer" & " " & strDriveLetter & "\" )
End Sub

Open in new window


Hope this helps!!!
You can save my example script as FILENAME.vbs

Cheers!!
Avatar of IT2Dr
IT2Dr

ASKER

will net use need logon script?
ASKER CERTIFIED SOLUTION
Avatar of Kruno Džoić
Kruno Džoić
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IT2Dr

ASKER

Thanks,