首页 > 应用开发 > IT综合 > vbs脚本获取Am注册路径信息
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/ ,如需转载,请注明出处,否则将追究法律责任。