LPARAMETERS pcServerName, pcUserName, pcDomain LOCAL cURL, oIE oIE = CREATEOBJECT("InternetExplorer.Application") cURL = "http://" + pcServerName + "/" oIE.Navigate(cURL) INKEY(1) nStartSeconds = SECONDS() DO WHILE oIE.ReadyState # 4 ; AND SECONDS() - nStartSeconds < 10 ENDDO IF oIE.ReadyState # 4 MESSAGEBOX("Can't connect to " ; + cURL ; + "." ; , 48 ; , "Terminal Server Error") oIE = .Null. RELEASE oIE RETURN .F. ENDIF IF TYPE("oIE.Document.Body.All.Server.Value") = "U" ; OR TYPE("oIE.Document.Body.All.CheckBoxAutoLogon.Value") = "U" ; OR TYPE("oIE.Document.Body.All.UserName.Value") = "U" ; OR TYPE("oIE.Document.Body.All.Domain.Value") = "U" ; OR TYPE("oIE.Document.Body.All.ButtonLogin.Value") = "U" MESSAGEBOX(cURL ; + " doesn't appear to be a Terminal Server." ; , 48 ; , "Terminal Server Error") oIE = .Null. RELEASE oIE RETURN .F. ENDIF WITH oIE.Document.Body.All .Server.Value = pcServerName .CheckBoxAutoLogon.Click() .CheckBoxAutoLogon.Checked = .T. .UserName.Value = pcUserName .Domain.Value = pcDomain .ButtonLogin.Click() ENDWITH oIE.Visible = .T. oIE = .Null. RELEASE oIEHope this helps,