Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 = TrueNext
'******* 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

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.

![]() |
![]() |
![]() |

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