Sub Attach(strServer, strPath, strUserName, strPassword) 'Authenticates you to a server by mapping a drive. Requires 'you to be logged in to your domain or tree if applicable. Dim net 'As WScript.Network If Left(strServer,2) <> "\\" Then strServer = "\\" & strServer If Left(strPath,1) <> "\" Then strPath = "\" & strPath If strUserName = "" Then strUserName = "guest" On Error Resume Next Set net = CreateObject("WScript.Network") 'Attach network. Map to a drive because I have to. net.MapNetworkDrive "Z:", strServer & strPath, , strUserName, strPassword 'Unmap the drive. But I'm still connected! net.RemoveNetworkDrive "Z:" End Sub