I am automating a website to fill login details. I have developed that app in vb6 and that was working greatly in windows xp, 7 and 8. Now it is giving error in Windows 10. In windows 10 when I run the exe directly, the login details are not filling.(I get "OnQuit fired" message). However, when I run the exe as Administrator it works properly. This is the vb6 code,
Private Sub Form_Load()
Set Web = New SHDocVw.InternetExplorer
Web.Visible = True
Web.Navigate "https://mytestingsite/login.html ", 8
End Sub
Private Sub Web_DocumentComplete(ByVal pDisp As Object, URL As Variant)
On Error GoTo aaa
'MsgBox " URL: " & URL
If URL = "https://mytestingsite/login.html" Then
Web.Document.getElementById("Login_userName").Value = "abcd"
Web.Document.getElementById("Login_userName").onchange
Web.Document.getElementById("Login_password").Value = "123456789"
Web.Document.getElementById("dateField").Value = "15/09/1954"
End If
Exit Sub
aaa:
MsgBox Err.Description & " URL: " & URL
End Sub
Private Sub Web_OnQuit()
MsgBox "OnQuit fired"
End Sub
My question is why run as administrator is required for simple web automation ? Is it not possible to run application in standard user in Windows 10 ? How to solve this problem ?
Please don’t suggest me to rebuild application in .net ( It will take lot of time to convert my application to .net)