【问题标题】:run-time error 429 on CreateObjectCreateObject 上的运行时错误 429
【发布时间】:2016-06-21 01:47:52
【问题描述】:

我收到运行时错误 429,ActiveX 错误:在从 vbscript 调用以下代码时无法创建对象“InternetExplorer.Application”

Set IE = CreateObject("InternetExplorer.Application")

我以非管理员帐户运行代码。如果以管理员身份运行,则代码可以正常工作。可能是什么问题呢?感谢您对此的帮助

【问题讨论】:

    标签: vbscript


    【解决方案1】:

    尝试使用此代码以管理员身份运行:

    If Not WScript.Arguments.Named.Exists("elevate") Then
      CreateObject("Shell.Application").ShellExecute WScript.FullName _
        , WScript.ScriptFullName & " /elevate", "", "runas", 1
      WScript.Quit
    End If
    
    Set IE = CreateObject("InternetExplorer.Application")
    'Your rest of your code goes here
    

    【讨论】:

    • 我需要在非管理员帐户上运行它。我尝试在 powershell 中运行代码并收到以下错误“检索具有 CLSID {0002DF01-0000-0000-C000-000000000046} 的组件的 COM 类工厂失败”。这是什么意思?
    猜你喜欢
    • 1970-01-01
    • 2017-10-14
    • 2021-08-04
    • 1970-01-01
    • 1970-01-01
    • 2017-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多