既然Office也提供了64位安装,那么在注册表中的哪里可以找到安装的Office版本是32位还是64位呢?
发布于 2010-05-26 05:11:43
我已经测试了Otaku的答案,似乎即使在没有安装Outlook的情况下,Outlook bitness值也是设置的,即使参考的文章没有明确指出会是这种情况。
发布于 2012-07-25 22:02:11
为了补充vtrz的答案,下面是我为Inno设置编写的函数:
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;
发布于 2017-04-24 12:37:52
我找到了检查办公室证物的方法。
我们可以使用以下注册表项检查office 365和2016 bitness:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
32位平台x86。
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
64位平台x64。
请检查...
https://stackoverflow.com/questions/2203980
复制相似问题