ITPub博客

首页 > 应用开发 > IT综合 > vbs脚本获取Am注册路径信息

vbs脚本获取Am注册路径信息

原创 IT综合 作者:mobox 时间:2020-05-20 13:04:55 0 删除 编辑

Dim WshShell, AMpath, Dllfile


Set WshShell = WScript.CreateObject("WScript.Shell")


call X86orX64()


 MsgBox X86orX64


If X86orX64 = "x86"  then

    dllfile = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ActiveSoft\STKClient")

    MsgBox Dllfile

Else

    dllfile = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ActiveSoft\STKClient")

    MsgBox Dllfile

End If


Function X86orX64()

    On Error Resume Next

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)

    

    For Each objItem in colItems

        If InStr(objItem.SystemType, "86") <> 0 Then

            X86orX64 = "x86"

        ElseIf InStr(objItem.SystemType, "64") <> 0 Then

            X86orX64 = "x64"

        Else

            X86orX64 = objItem.SystemType

        End If

    Next

    

End Function


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28660496/viewspace-2693188/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2020-05-10

  • 博文量
    37
  • 访问量
    42172