Computing.Net > Forums > Windows Server 2003 > problem with map a drive at logon

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

problem with map a drive at logon

Reply to Message Icon

Name: fuad
Date: July 7, 2004 at 18:16:14 Pacific
OS: win2k3
CPU/Ram: 1g 2.5 g
Comment:

Any body has an idea about this problem, please post!

I have share folders in win 2003 that is running iis, file server, and ftp. No Active Directory. The problem is that when I connect from winxp pro. to the share drives, the next time I logon sometimes It connects sometimes no. so far I have used the following methods to solve it but without luck:

net use persistent: yes
And I also used a .bat file that disconnect the drive and reconnect it again, but did not work.
I have also used this .vbs script (please see at the end) that disconnect the drive and reconnect it again. but the problem still the same, sometimes it works and connect ok, but sometimes did not. I can connect to some other shares from this winxp machine (smb in linux) without this problem.
So if you have any ideas please help? Thank you.

here is my scrip that I scheduled at logon:
' This VBScript script:
' 1. Maps the the drive to \\server\share
' 2. If the the drive is connected it disconnects it and connects it again!
' *********************************************************************
' Creates the Shell or environment for the commands
Set WshShell = WScript.CreateObject("WScript.Shell")

' Sets the variables
Set GradNet = WScript.CreateObject("WScript.Network")
Set CheckDrive = GradNet.EnumNetworkDrives()

'DriveLetter, Must be CAPITAL letter
'***********************************************************
Mapit "H:", "\\server\share", "user", "passwd"
Mapit "J:", "\\server\share", "user", "passwd"
'***********************************************************
strProfile = "False" ' Mapping stored in user Profile
'******Loop*********
Sub Mapit(DriveLetter, RemotePath, strUser, strPass)
AlreadyConnected = False
For i = 0 To CheckDrive.Count - 1 Step 2
If CheckDrive.Item(i) = DriveLetter Then AlreadyConnected = True

Next
'******* Disconnect it if it is connected********
'On Error Resume Next
If AlreadyConnected = True then
GradNet.RemoveNetworkDrive DriveLetter
GradNet.MapNetworkDrive DriveLetter, RemotePath,strProfile, strUser, strPass
Else
GradNet.MapNetworkDrive DriveLetter, RemotePath,strProfile, strUser, strPass
End if
End Sub

' Script ends here



Sponsored Link
Ads by Google

Response Number 1
Name: briantech
Date: July 8, 2004 at 06:32:18 Pacific
Reply:

So this box is not running Ad , it's a member server?


0

Response Number 2
Name: fuad
Date: July 8, 2004 at 15:09:52 Pacific
Reply:

this is just an xp workstation. and it is not a member of the server, just need to connect to the share. and the win 2003 server is not running AD. Correct.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Server 2003 Forum Home


Sponsored links

Ads by Google


Results for: problem with map a drive at logon

Map a drive www.computing.net/answers/windows-2003/map-a-drive/4748.html

Can't Map a drive to the server www.computing.net/answers/windows-2003/cant-map-a-drive-to-the-server/6919.html

Mapping a drive on service level www.computing.net/answers/windows-2003/mapping-a-drive-on-service-level/6834.html