-
March 4th, 2018, 09:48 AM
#1
VBS file not able to open Internet Explorer
Hi,
I am facing a few issues since an automatic update. First my Brother Scanner software started acting up. I tried a couple of times to do a system restore but it didn't work. I suspected a virus so I ran the anti-virus /malware programs recommended by majorgeeks.com - malware bytes, hitmanPro, rougekiller etc.
Now I am noticing that my VBS files are no more able to open Internet Explorer ( I have IE11). I made sure that simple vb scripts such as Msgbox "Hello World" are working fine.
When I run a simple script like the one below, the IE doesn't pop up. The taskmanager, however, shows that the process of Microsoft Windows Based Script Host is running.
How do I fix this?
Thanks.
Code:
On Error Resume Next
Dim ObjIE
Set ObjIE = CreateObject("InternetExplorer.Application")
With ObjIE
.Visible = 1
.navigate "www.google.com"
Do While .Busy: DoEvents: Loop
Do While .readyState <> 4: DoEvents: Loop
End With
-
March 4th, 2018, 12:12 PM
#2
Re: VBS file not able to open Internet Explorer
Did you debug your code? Did you do some error checking?
Victor Nijegorodov
-
March 4th, 2018, 12:34 PM
#3
Re: VBS file not able to open Internet Explorer
Originally Posted by VictorN
Did you debug your code? Did you do some error checking?
No, I did not suspect any error as I have been using these scripts for a long time.
Also, is there an editor to debug a vbs script? I usually, use my Excel VBA if a script has issues.
-
March 4th, 2018, 01:12 PM
#4
Re: VBS file not able to open Internet Explorer
Originally Posted by musicgold
No, I did not suspect any error as I have been using these scripts for a long time.
Also, is there an editor to debug a vbs script? I usually, use my Excel VBA if a script has issues.
I used some old versions of Excel VBA a lot of years back and there was no any problem to debug...
You could also do something like in this example: https://technet.microsoft.com/en-us/.../ee692852.aspx
Victor Nijegorodov
-
March 4th, 2018, 02:07 PM
#5
Re: VBS file not able to open Internet Explorer
Originally Posted by VictorN
Did you debug your code? Did you do some error checking?
Okay, having removed the "On Error Resume Next" line, I am now getting the following error message:
Activex Component can't create object: InternetExplorer. Application
Code: 800A01AD
Source: Microsoft VBScript runtime error
What should I do now?
-
March 4th, 2018, 02:18 PM
#6
Re: VBS file not able to open Internet Explorer
Well, at this point I cannot help you more.
Try to google for this error code:
https://www.google.de/search?q=800A0...hrome&ie=UTF-8
Victor Nijegorodov
-
March 5th, 2018, 04:43 AM
#7
Re: VBS file not able to open Internet Explorer
Your code is fine. It sounds like either something is blocking access to launch IE or IE itself has been removed. Can you open IE manually? Check your AV software to see if it's reporting any problems, and it might be worth disabling it temporarily before trying the script again. Run REGEDIT and do a search on My Computer for "InternetExplorer.Application" to see if the COM component is still registered.
It's also worth opening a Command Prompt as Administrator and launch your VBScript again using CSCRIPT.EXE to see if it's a rights issue.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|