Error using VB6 in Windows 10 for WebAutomation

I am automating a website to fill in the login details. I have developed this application in vb6 and it runs very well in Windows XP, 7 and 8. Now it is in Windows An error occurred in 10.
In Windows 10, when I run the exe directly, the login details are not filled. (I receive the “OnQuit” message). However, when I run the exe as an administrator, it can It works normally.
This is 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 simple web automation needs to be run as an administrator?
Is it impossible to run applications in standard users in Windows 10?
How to solve this problem?

Please do not suggest me to rebuild the application in .net (it takes a long time to convert my application to .net)

The quick way to solve your problem is to publish the manifest and .exe

Describe here:
How do I create a manifest file in Visual Basic 6.0?

I am automating a website to fill in the login details. I have developed this application in vb6 and it runs in Windows XP, 7 and 8 Very good. Now it’s wrong in Windows 10.
In Windows 10, when I run the exe directly, the login details are not filled. (I received the “OnQuit” message). However, when I managed When running the exe as a member, it works normally.
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 = "1 23456789"
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 does simple web automation need to be run as an administrator?
Is it impossible to run applications in standard users in Windows 10?
How to solve this problem?

Please do not suggest me to rebuild the application in .net (it takes a long time to convert my application to .net)

The quick way to solve your problem is to publish the manifest and .exe

Describe here:
How do I create a manifest file in Visual Basic 6.0?

Leave a Comment

Your email address will not be published.