VBScript error – The Interface is Unknown

I have some vbscript code as below:

Set WshShell = CreateObject("WScript.Shell")
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate ("http://URLOnMyIntranet//?cid=6&c=12&cpc=dt2wJiVUfnQ2")
IE.Visible = True
WshShell.AppActivate(IE)
IE.Quit

When I run it, I got “Interface is Unknown” error for the last line. Did some googling and found the solution is to run command prompt as administrator and then run the vbscript from it.
It did waste me some time before I did some google search.

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to VBScript error – The Interface is Unknown

  1. j5423's avatar j5423 says:

    Forgot to mention I’m using Windows 7 and IE10.

Leave a Reply