首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >通过注册表检测Office是32位还是64位

通过注册表检测Office是32位还是64位
EN

Stack Overflow用户
提问于 2010-02-05 07:20:52
回答 19查看 182.9K关注 0票数 52

既然Office也提供了64位安装,那么在注册表中的哪里可以找到安装的Office版本是32位还是64位呢?

EN

回答 19

Stack Overflow用户

发布于 2010-05-26 05:11:43

我已经测试了Otaku的答案,似乎即使在没有安装Outlook的情况下,Outlook bitness值也是设置的,即使参考的文章没有明确指出会是这种情况。

票数 23
EN

Stack Overflow用户

发布于 2012-07-25 22:02:11

为了补充vtrz的答案,下面是我为Inno设置编写的函数:

代码语言:javascript
复制
const
  { Constants for GetBinaryType return values. }
  SCS_32BIT_BINARY = 0;
  SCS_64BIT_BINARY = 6;
  { There are other values that GetBinaryType can return, but we're }
  { not interested in them. }

{ Declare Win32 function  }
function GetBinaryType(lpApplicationName: AnsiString; var lpBinaryType: Integer): Boolean;
external 'GetBinaryTypeA@kernel32.dll stdcall';

function Is64BitExcelFromRegisteredExe(): Boolean;
var
  excelPath: String;
  binaryType: Integer;
begin
  Result := False; { Default value - assume 32-bit unless proven otherwise. }
  { RegQueryStringValue second param is '' to get the (default) value for the key }
  { with no sub-key name, as described at }
  { http://stackoverflow.com/questions/913938/ }
  if IsWin64() and RegQueryStringValue(HKEY_LOCAL_MACHINE,
      'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe',
      '', excelPath) then begin
    { We've got the path to Excel. }
    try
      if GetBinaryType(excelPath, binaryType) then begin
        Result := (binaryType = SCS_64BIT_BINARY);
      end;
    except
      { Ignore - better just to assume it's 32-bit than to let the installation }
      { fail.  This could fail because the GetBinaryType function is not }
      { available.  I understand it's only available in Windows 2000 }
      { Professional onwards. }
    end;
  end;
end;
票数 12
EN

Stack Overflow用户

发布于 2017-04-24 12:37:52

我找到了检查办公室证物的方法。

我们可以使用以下注册表项检查office 365和2016 bitness:

代码语言:javascript
复制
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

32位平台x86。

代码语言:javascript
复制
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

64位平台x64。

请检查...

票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2203980

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档