Powershell System.__ComObject.document property no longer works under IE 9

前端 未结 3 522
花落未央
花落未央 2020-12-03 12:55

I\'ve been writing up a script that runs some server functions using a web-browser interface. I coded up the script on Windows 7 with Internet explorer 8 and it works fine.

3条回答
  •  天涯浪人
    2020-12-03 13:33

    I had similar kind of issue and it got resolved by following below steps:

    1. Check for the Microsoft.mshtml.dll on your machine. It should be available at location C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies. If you don't find it at this location, It might be the case that you don't have this dll and this is the reason you are getting this issue.

    2. Find the dll, and try to load the assembly at run time. You can place the dll at any location on you machine and do it. Below is the link to a method to load assembly at run time. https://onedrive.live.com/?cid=21ad54fd70600673&id=21AD54FD70600673%211922

提交回复
热议问题