1

执行以下 Vb 脚本导致错误:(空)代码:8004100E 源:(空)错误

程序:- '列出 Internet Explorer 摘要设置

    strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & _
            "\root\cimv2\Applications\MicrosoftIE")

Set colIESettings = objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_Summary")

For Each strIESetting in colIESettings
    Wscript.Echo "Active printer: " & strIESetting.ActivePrinter
    Wscript.Echo "Build: " & strIESetting.Build
    Wscript.Echo "Cipher strength: " & strIESetting.CipherStrength
    Wscript.Echo "Content advisor: " & strIESetting.ContentAdvisor
    Wscript.Echo "IE Administration Kit installed: " & _
        strIESetting.IEAKInstall
    Wscript.Echo "Language: " & strIESetting.Language
    Wscript.Echo "Name: " & strIESetting.Name
    Wscript.Echo "Path: " & strIESetting.Path
    Wscript.Echo "Product ID: " & strIESetting.ProductID
    Wscript.Echo "Version: " & strIESetting.Version
Next

错误:-


VbsEdit 64 位

行:5 列:1 错误:(空)代码:8004100E 源:(空)

是否要停止调试?

是 否

请帮助我克服这个问题。

4

1 回答 1

2

错误 8004100E 表示“无效的命名空间”。从 Windows Vista 开始,命名空间root\cimv2\Applications\MicrosoftIE已从 WMI 中删除。

于 2013-05-15T13:32:57.530 回答