Detect whether Office is 32bit or 64bit via the registry

前端 未结 28 1057
春和景丽
春和景丽 2020-11-29 21:29

Now that Office also comes in a 64bit install, where in the registry do you find out if the version of Office installed is 32bit or 64bit?

28条回答
  •  北海茫月
    2020-11-29 22:12

    Here's what I was able to use in a VBscript to detect Office 64bit Outlook:

    Dim WshShell, blnOffice64, strOutlookPath
    Set WshShell = WScript.CreateObject("WScript.Shell")
    blnOffice64=False
    strOutlookPath=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe\Path")
    If WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") = "AMD64" And _
        not instr(strOutlookPath, "x86") > 0 then 
      blnOffice64=True
      wscript.echo "Office 64"
    End If
    

提交回复
热议问题