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

发布于 2024-08-19 23:49:52 字数 73 浏览 4 评论 0原文

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(28

节枝 2024-08-26 23:49:53

我之前盲目地遵循了基于 MSDN 文档的答案。今天,事实证明这低于要求。在安装了 Office Home 和 Student 且不包含 Outlook 的计算机上,存在 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Outlook,但 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Office\14.0\Outlook 不是。我现在更改了代码,首先查找“普通”非 Wow6432Node 版本。如果存在,就会使用它。如果没有,它将继续查看 Wow6432Node 版本。这是在基于 Inno Setup 的安装程序中进行检查的 - 我不知道 Inno Setup 使用哪些 API。如果您的应用程序不以相同的方式访问注册表,您可能会看到不同的结果。

I've previously blindly followed the answer based on the MSDN docs. Today, this turned out to be less than required. On a machine with Office Home and Student installed, which doesn't include Outlook, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Outlook was present, but HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook was not. I've now changed my code to first look for the "plain" non-Wow6432Node version. If that's present, it'll be used. If not, it will continue by looking at the Wow6432Node version. This is being checked in an Inno Setup-based installer - I don't know which APIs Inno Setup uses. If your app doesn't access the registry in the same way, you might see different results.

-残月青衣踏尘吟 2024-08-26 23:49:53

在注册表中搜索您感兴趣的 Office 组件的安装路径,例如,对于 Excel 2010,请在 SOFTWARE(Wow6432Node)\Microsoft\Office\14.0\Excel\InstallRoot 中查找。它只会存在于 32 位注册表或 64 位注册表中,而不会同时存在于两者中。

Search the registry for the install path of the office component you are interested in, e.g. for Excel 2010 look in SOFTWARE(Wow6432Node)\Microsoft\Office\14.0\Excel\InstallRoot. It will only be either in the 32-bit registry or the 64-bit registry not both.

感性 2024-08-26 23:49:53

我最初是为 Outlook 写的。对 Word 进行了一些修改,但它无法在独立安装中运行,因为该键不显示位数,只有 Outlook 可以显示位数。

另外,我编写它是为了仅支持当前版本的 Office,=>2010

我剥离了所有设置和后期处理...

:checkarch
    IF NOT "%PROCESSOR_ARCHITECTURE%"=="x86" SET InstallArch=64bit
    IF "%PROCESSOR_ARCHITEW6432%"=="AMD64" SET InstallArch=64bit
    IF "%InstallArch%"=="64bit" SET Wow6432Node=\Wow6432Node
GOTO :beginscript

:beginscript
SET _cmdDetectedOfficeVersion=reg query "HKEY_CLASSES_ROOT\Word.Application\CurVer"
@FOR /F "tokens=* USEBACKQ" %%F IN (`!_cmdDetectedOfficeVersion! 2^>NUL `) DO (
SET _intDetectedOfficeVersion=%%F
)
set _intDetectedOfficeVersion=%_intDetectedOfficeVersion:~-2%


:switchCase
:: Call and mask out invalid call targets
    goto :case!_intDetectedOfficeVersion! 2>nul || (
:: Default case
    ECHO Not installed/Supported
    )
  goto :case-install

:case14
    Set _strOutlookVer= Word 2010 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    GOTO :case-install  
:case15
    Set _strOutlookVer= Word 2013 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    GOTO :case-install
:case16
    Set _strOutlookVer= Word 2016 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    goto :case-install
:case-install
    CALL :output_text !_strOutlookVer! !_strBitness! is installed
GOTO :endscript


:GetBitness
FOR /F "tokens=3*" %%a in ('reg query "HKLM\Software%Wow6432Node%\Microsoft\Office\%1.0\Outlook" /v Bitness 2^>NUL') DO Set _strBitness=%%a
GOTO :EOF

I wrote this for Outlook at first. Modified it a little for Word, but it will not work on a standalone install because that key does not show the bitness, only Outlook does.

Also, I wrote it to only support current versions of Office, =>2010

I stripped all the setup and post processing...

:checkarch
    IF NOT "%PROCESSOR_ARCHITECTURE%"=="x86" SET InstallArch=64bit
    IF "%PROCESSOR_ARCHITEW6432%"=="AMD64" SET InstallArch=64bit
    IF "%InstallArch%"=="64bit" SET Wow6432Node=\Wow6432Node
GOTO :beginscript

:beginscript
SET _cmdDetectedOfficeVersion=reg query "HKEY_CLASSES_ROOT\Word.Application\CurVer"
@FOR /F "tokens=* USEBACKQ" %%F IN (`!_cmdDetectedOfficeVersion! 2^>NUL `) DO (
SET _intDetectedOfficeVersion=%%F
)
set _intDetectedOfficeVersion=%_intDetectedOfficeVersion:~-2%


:switchCase
:: Call and mask out invalid call targets
    goto :case!_intDetectedOfficeVersion! 2>nul || (
:: Default case
    ECHO Not installed/Supported
    )
  goto :case-install

:case14
    Set _strOutlookVer= Word 2010 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    GOTO :case-install  
:case15
    Set _strOutlookVer= Word 2013 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    GOTO :case-install
:case16
    Set _strOutlookVer= Word 2016 (!_intDetectedOfficeVersion!)
    CALL :GetBitness !_intDetectedOfficeVersion!
    goto :case-install
:case-install
    CALL :output_text !_strOutlookVer! !_strBitness! is installed
GOTO :endscript


:GetBitness
FOR /F "tokens=3*" %%a in ('reg query "HKLM\Software%Wow6432Node%\Microsoft\Office\%1.0\Outlook" /v Bitness 2^>NUL') DO Set _strBitness=%%a
GOTO :EOF
指尖凝香 2024-08-26 23:49:53

在我的测试中,这里描述的许多方法都失败了,我认为是因为它们依赖于 Windows 注册表中的条目,而这些条目结果并不可靠,具体取决于 Office 版本、安装方式等。因此,另一种方法是不使用完全不使用注册表(好吧,严格来说,这使它不能回答所提出的问题),而是编写一个脚本来:

  1. 实例化 Excel
  2. 将工作簿添加到该 Excel 实例
  3. 将 VBA 模块添加到该工作簿
  4. 注入一个小的 VBA 函数 的位数
  5. 返回 Office调用函数
  6. Cleans up

以下是在 VBScript 中实现的方法:

Function OfficeBitness()

    Dim VBACode, Excel, Wb, Module, Result

    VBACode = "Function Is64bit() As Boolean" & vbCrLf & _
              "#If Win64 Then" & vbCrLf & _
              "    Is64bit = True" & vbCrLf & _
              "#End If" & vbCrLf & _
              "End Function"

    On Error Resume Next
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = False
    Set Wb = Excel.Workbooks.Add
    Set Module = Wb.VBProject.VBComponents.Add(1)
    Module.CodeModule.AddFromString VBACode
    Result = Excel.Run("Is64bit")
    Set Module = Nothing
    Wb.Saved = True
    Wb.Close False
    Excel.Quit
    Set Excel = Nothing
    On Error GoTo 0
    If IsEmpty(Result) Then
        OfficeBitness = 0 'Alternatively raise an error here?
    ElseIf Result = True Then
        OfficeBitness = 64
    Else
        OfficeBitness = 32
    End If

End Function

PS。这种方法比这里的其他方法运行得更慢(在我的电脑上大约 2 秒),但在不同的安装和 Office 版本中它可能会更可靠。

几个月后,我意识到可能有一种更简单的方法,尽管仍然是实例化 Excel 实例的方法。 VBScript 是:

Function OfficeBitness()
    Dim Excel
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = False
    If InStr(Excel.OperatingSystem,"64") > 0 Then
        OfficeBitness = 64
    Else
        OfficeBitness = 32
    End if
    Excel.Quit
    Set Excel = Nothing
End Function

这依赖于以下事实:当从 64 位 Windows 上的 32 位 Excel 调用时,Application.OperatingSystem 返回 Windows(32 位)NT 10.00 或至少在我的电脑上是这样。但文档中没有提到这一点。

In my tests many of the approaches described here fail, I think because they rely on entries in the Windows registry that turn out to be not reliably present, depending on Office version, how it was installed etc. So a different approach is to not use the registry at all (Ok, so strictly that makes it not an answer to the question as posed), but instead write a script that:

  1. Instantiates Excel
  2. Adds a workbook to that Excel instance
  3. Adds a VBA module to that workbook
  4. Injects a small VBA function that returns the bitness of Office
  5. Calls that function
  6. Cleans up

Here's that approach implemented in VBScript:

Function OfficeBitness()

    Dim VBACode, Excel, Wb, Module, Result

    VBACode = "Function Is64bit() As Boolean" & vbCrLf & _
              "#If Win64 Then" & vbCrLf & _
              "    Is64bit = True" & vbCrLf & _
              "#End If" & vbCrLf & _
              "End Function"

    On Error Resume Next
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = False
    Set Wb = Excel.Workbooks.Add
    Set Module = Wb.VBProject.VBComponents.Add(1)
    Module.CodeModule.AddFromString VBACode
    Result = Excel.Run("Is64bit")
    Set Module = Nothing
    Wb.Saved = True
    Wb.Close False
    Excel.Quit
    Set Excel = Nothing
    On Error GoTo 0
    If IsEmpty(Result) Then
        OfficeBitness = 0 'Alternatively raise an error here?
    ElseIf Result = True Then
        OfficeBitness = 64
    Else
        OfficeBitness = 32
    End If

End Function

PS. This approach runs more slowly than others here (about 2 seconds on my PC) but it might turn out to be more reliable across different installations and Office versions.

After some months, I've realised there may be a simpler approach, though still one that instantiates an Excel instance. The VBScript is:

Function OfficeBitness()
    Dim Excel
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = False
    If InStr(Excel.OperatingSystem,"64") > 0 Then
        OfficeBitness = 64
    Else
        OfficeBitness = 32
    End if
    Excel.Quit
    Set Excel = Nothing
End Function

This relies on the fact that Application.OperatingSystem, when called from 32-bit Excel on 64-bit Windows returns Windows (32-bit) NT 10.00 or at least it does on my PC. But that's not mentioned in the docs.

咿呀咿呀哟 2024-08-26 23:49:53

我有 win 7 64 位 + Excel 2010 32 位。
注册表为 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-002A-0000-1000-0000000FF1CE}

所以这可以告诉操作系统的位数,而不是 Office 的位数

I have win 7 64 bit + Excel 2010 32 bit.
The registry is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-002A-0000-1000-0000000FF1CE}

So this can tell bitness of OS, not bitness of Office

半城柳色半声笛 2024-08-26 23:49:53

我在基于 InnoSetup 的脚本中找到了一种安全可靠的方法,通过使用 Win32 API 函数来了解特定应用程序是 32 位还是 64 位(在我的例子中,我需要测试 Excel)。这个函数称为 GetBinaryType(),它来自“kernel32”(尽管它有 32 位和 64 位版本的名称),并且直接查看 exe 的标头。

I've found a secure and reliable way in my InnoSetup-based script to understand whether a particular application is 32-bit or 64-bit (in my case I needed to test Excel), by using a Win32 API function. This function is called GetBinaryType(), it comes from `kernel32' (despite the name it comes in 32 and 64 bit flavor) and looks directly at the exe's header.

素染倾城色 2024-08-26 23:49:53

这篇维基百科文章指出:

在 64 位版本的 Windows 上,有两个用于存放应用程序文件的文件夹; “Program Files” 文件夹包含 64 位程序,“Program Files (x86)” 文件夹包含 32 位程序。

因此,如果程序安装在 C:\Program Files 下,则它是 64 位版本。如果它安装在 C:\Program Files (x86) 下,则它是 32 位安装。

This Wikipedia article states:

On 64-bit versions of Windows, there are two folders for application files; the "Program Files" folder contains 64-bit programs, and the "Program Files (x86)" folder contains 32-bit programs.

So if the program is installed under C:\Program Files it is a 64-bit version. If it is installed under C:\Program Files (x86) it is a 32-bit installation.

椒妓 2024-08-26 23:49:53

检测 Office 位数的另一种方法是找出类型库。

例如,要检测 Outlook 的位数,请编写一个 .JS 文件,如下所示:

function detectVersion()
    var outlooktlib = "TypeLib\\{00062FFF-0000-0000-C000-000000000046}";
    var HKCR = 0x80000000;

    var loc = new ActiveXObject("WbemScripting.SWbemLocator");
    var svc = loc.ConnectServer(null,"root\\default");
    var reg = svc.Get("StdRegProv");

    var method = reg.Methods_.Item("EnumKey");
    var inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib;
    var outparam = reg.ExecMethod_(method.Name,inparam);
    tlibver = outparam.sNames.toArray()[0];

    method = reg.Methods_.Item("GetStringValue");
    inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib + "\\" + tlibver + "\\0\\win32";
    inparam.sValueName = "";
    outparam = reg.ExecMethod_(method.Name,inparam);
    if(outparam.sValue) return "32 bit";

    method = reg.Methods_.Item("GetStringValue");
    inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib + "\\" + tlibver + "\\0\\win64";
    inparam.sValueName = "";
    outparam = reg.ExecMethod_(method.Name,inparam);
    if(outparam.sValue) return "64 bit";

    return "Not installed or unrecognizable";
}

您可以找到其他 Office 组件的 typelib id,并替换它的函数的第一行。以下是一些有趣的 ID 的简要列表:

{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07} - Access
{00020905-0000-0000-C000-000000000046} - Word
{00020813-0000-0000-C000-000000000046} - Excel
{91493440-5A91-11CF-8700-00AA0060263B} - Powerpoint
{0002123C-0000-0000-C000-000000000046} - Publisher
{0EA692EE-BB50-4E3C-AEF0-356D91732725} - OneNote 2010+
{F2A7EE29-8BF6-4A6D-83F1-098E366C709C} - OneNote 2007

以上所有 lib id 都是通过 Windows SDK 工具 OLE-COM Object Viewer 找到的,您可以使用它找到更多的 lib id。

这种方法的好处是它适用于所有版本的 Office,并提供对您感兴趣的每个组件的控制。此外,这些键位于 HKEY_CLASSES_ROOT 中并深度集成到系统中,因此即使在沙箱环境中也不太可能无法访问它们。

Another way to detect the bitness of Office is to find out the typelib.

For example, to detect Outlook's bitness, write a .JS file as following:

function detectVersion()
    var outlooktlib = "TypeLib\\{00062FFF-0000-0000-C000-000000000046}";
    var HKCR = 0x80000000;

    var loc = new ActiveXObject("WbemScripting.SWbemLocator");
    var svc = loc.ConnectServer(null,"root\\default");
    var reg = svc.Get("StdRegProv");

    var method = reg.Methods_.Item("EnumKey");
    var inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib;
    var outparam = reg.ExecMethod_(method.Name,inparam);
    tlibver = outparam.sNames.toArray()[0];

    method = reg.Methods_.Item("GetStringValue");
    inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib + "\\" + tlibver + "\\0\\win32";
    inparam.sValueName = "";
    outparam = reg.ExecMethod_(method.Name,inparam);
    if(outparam.sValue) return "32 bit";

    method = reg.Methods_.Item("GetStringValue");
    inparam = method.InParameters.SpawnInstance_();
    inparam.hDefKey = HKCR;
    inparam.sSubKeyName = outlooktlib + "\\" + tlibver + "\\0\\win64";
    inparam.sValueName = "";
    outparam = reg.ExecMethod_(method.Name,inparam);
    if(outparam.sValue) return "64 bit";

    return "Not installed or unrecognizable";
}

You could find out other Office component's typelib id, and replace the first line of the function for it. Here is a brief list of interesting IDs:

{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07} - Access
{00020905-0000-0000-C000-000000000046} - Word
{00020813-0000-0000-C000-000000000046} - Excel
{91493440-5A91-11CF-8700-00AA0060263B} - Powerpoint
{0002123C-0000-0000-C000-000000000046} - Publisher
{0EA692EE-BB50-4E3C-AEF0-356D91732725} - OneNote 2010+
{F2A7EE29-8BF6-4A6D-83F1-098E366C709C} - OneNote 2007

All above lib id were found through the Windows SDK tool OLE-COM Object Viewer, you could find out more lib id's by using it.

The benefit of this approach is that it works for all versions of office, and provides control on every single component in you interest. Furthermore, those keys are in the HKEY_CLASSES_ROOT and deeply integrated into the system, so it is highly unlikely they were not accessible even in a sandbox environment.

2024-08-26 23:49:53

您不需要编写它的脚本。看看我偶然发现的这个页面:

https://social.msdn.microsoft.com/Forums/office/en-US/ 43499ae0-bcb5-4527-8edb-f5a955987b56/how-to-detect-whether-installed-ms-office-2010-is-32-or-64-bit?forum=worddev

总结一下:

第四个字段产品代码表示产品的位数。

{BRMMmmmm-PPPP-LLLL-p000-D000000FF1CE}
p000

0 表示 x86,1 表示 x64 0-1(这也适用于 MSOffice 2013)

You do not need to script it. Look at this page that I stumbled across:

https://social.msdn.microsoft.com/Forums/office/en-US/43499ae0-bcb5-4527-8edb-f5a955987b56/how-to-detect-whether-installed-ms-office-2010-is-32-or-64-bit?forum=worddev

To summarize:

The fourth field in the productcode indicates the bitness of the product.

{BRMMmmmm-PPPP-LLLL-p000-D000000FF1CE}
p000

0 for x86, 1 for x64 0-1 (This also holds true for MSOffice 2013)

谁把谁当真 2024-08-26 23:49:53

我的计算机上不存在 Outlook Bitness 注册表项。

确定 Outlook Bitness 的一种方法是检查 Outlook.exe 本身并确定它是 32 位还是 64 位。

具体来说,您可以检查 [IMAGE_FILE_HEADER.Machine][1] 类型,这将返回一个指示处理器类型的值。

有关此讨论的优秀背景信息,在阅读文件的 PE 标头时,请阅读此 (过时的链接),其中指出;

IMAGE_NT_HEADERS 结构是存储 PE 文件详细信息的主要位置。它的偏移量由文件开头的 IMAGE_DOS_HEADER 中的 e_lfanew 字段给出。 IMAGE_NT_HEADER 结构实际上有两个版本,一种用于 32 位可执行文件,另一种用于 64 位版本。这些差异是如此之小,以至于出于本次讨论的目的,我将认为它们是相同的。唯一正确的、Microsoft 批准的区分两种格式的方法是通过 IMAGE_OPTIONAL_HEADER 中 Magic 字段的值(稍后描述)。

IMAGE_NT_HEADER 由三个字段组成:

typedef struct _IMAGE_NT_HEADERS {
双字签名;
IMAGE_FILE_HEADER 文件头;
IMAGE_OPTIONAL_HEADER32 可选标头;
} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;

你可以获得c#代码

Magic 字段位于 IMAGE_OPTIONAL_HEADER 结构的开头,位于 _IMAGE_NT_HEADERS 开头偏移量 24 处的 2 个字节处。 32 位的值为 0x10B,64 位的值为 0x20B。

Outlook Bitness registry key does not exist on my machine.

One way to determine Outlook Bitness is by examining Outlook.exe, itself and determine if it is 32bit or 64bit.

Specifically, you can check the [IMAGE_FILE_HEADER.Machine][1] type and this will return a value indicating processor type.

For an excellent background of this discussion, on reading the PE Header of a file read this (outdated link), which states;

The IMAGE_NT_HEADERS structure is the primary location where specifics of the PE file are stored. Its offset is given by the e_lfanew field in the IMAGE_DOS_HEADER at the beginning of the file. There are actually two versions of the IMAGE_NT_HEADER structure, one for 32-bit executables and the other for 64-bit versions. The differences are so minor that I'll consider them to be the same for the purposes of this discussion. The only correct, Microsoft-approved way of differentiating between the two formats is via the value of the Magic field in the IMAGE_OPTIONAL_HEADER (described shortly).

An IMAGE_NT_HEADER is comprised of three fields:

typedef struct _IMAGE_NT_HEADERS {
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;

and you can get the c# code here.

The Magic field is at the start of the IMAGE_OPTIONAL_HEADER structure, 2 bytes at offset 24 from the start of the _IMAGE_NT_HEADERS. It has values of 0x10B for 32-bit and 0x20B for 64-bit.

狼性发作 2024-08-26 23:49:53

最简单的方法:将“关于”图标放在 Office 2016 应用程序上。 Excel 示例

1) 打开 Excel ->文件->选项->自定义功能区

2) 您将看到 2 个窗格。从 & 选择命令自定义功能区

3) 从“选择命令”中,选择所有命令

4) 从结果列表中突出显示“关于”(Excel)

5) 从“自定义功能区”中,突出显示要放置“关于”图标的任何项目(例如视图)

6)单击底部的新建组

7) 单击位于两个窗格之间的添加按钮。
完成

现在,当您单击 Excel 中的“查看”选项卡并单击“关于”时,您将看到 32 位或 64 位

Best easy way: Put the ABOUT Icon on your Office 2016 Application. Example Excel

1) Open Excel -> File -> Options -> Customize Ribbon

2) You 'll see 2 panes. Choose Commands From & Customize The Ribbon

3) From Choose Command, Select All Commands

4) From the resulting List Highlight About (Excel)

5) From the Customize The Ribbon Pain, Highlight Any Item (ex. View) where you want to put the About icon

6) Click New group at the bottom

7) Click the add button located between the two pane.
DONE

Now when you click the View Tab in excel and click about you'll see 32 bit or 64 bit

计㈡愣 2024-08-26 23:49:53

我找到了一种更简单的方法。
使用Powershell,我们可以将Excel挂钩为COM对象。

$user = $env:UserName
$msoExcel = New-Object -ComObject Excel.Application  
$msoExcel | Select-Object -Property OperatingSystem | Out-File "\\SERVER\Path\To\Dump\msoVersion-$user.txt"
exit

当以这种方式请求操作系统时,我们会得到奇怪的结果,
看看这里。 PC3 是我的。

我希望这对你们有用。抱歉,缺少代码;我的脚本大部分都是实用的。

编辑
不要忘记添加代码以在检索完数据后关闭 Excel。
昨天测试此代码后,我突然打开了大量 Excel 并崩溃了。
这将确保您让用户和管理员满意(:

[System.Runtime.Interopservices.Marshal]::ReleaseComObject($msoExcel)
Remove-Variable msoExcel

I've found a much easier way.
Using Powershell, we can hook Excel as a COM object.

$user = $env:UserName
$msoExcel = New-Object -ComObject Excel.Application  
$msoExcel | Select-Object -Property OperatingSystem | Out-File "\\SERVER\Path\To\Dump\msoVersion-$user.txt"
exit

When requesting the OperatingSystem this way, we get strange results,
have a look here. PC3 is mine.

I hope this works for you guys. Sorry for the lack of code; my scripts are mostly functional.

Edit:
Don't forget to add the code to close Excel after you're done retrieving the data.
After testing this code yesterday I had tons of Excel opening and crashing all of a sudden..
This will make sure you'll keep users and admins happy (:

[System.Runtime.Interopservices.Marshal]::ReleaseComObject($msoExcel)
Remove-Variable msoExcel
会傲 2024-08-26 23:49:53

如果只想知道已安装的 Office 2010 版本的位数,则在 Office 2010 的任何应用程序中,只需单击“文件”,然后单击“帮助”。将列出有关版本号的信息,旁边的括号中将是(32 位)或(64 位)。

If one wants to know only what bit number an installed version of Office 2010 is, then in any application of Office 2010, just click on File, then on Help. Information about version number will be listed, and next to that, in parentheses, will be either (32-bit) or (64-bit).

甜`诱少女 2024-08-26 23:49:53

打开 Outlook 2013 >文件>办公帐号>关于展望>单击大“?关于 Outlook”按钮 >阅读弹出说明

Open Outlook 2013 > File > Office account > About Outlook > click large "? About Outlook" button > read popup description

烟沫凡尘 2024-08-26 23:49:52

摘自有关 64 位版本的 Office 2010

如果您已安装 Office 2010
包括 Microsoft Outlook 2010、
Outlook 设置一个名为
安装它的计算机上 REG_SZ 类型的位数。这
Bitness 注册表项指示是否安装 Outlook 2010
是 32 位还是 64 位。这可能是
对管理员有用
对审核计算机感兴趣
确定已安装的版本
他们组织中的 Office 2010。

  • 注册表路径:HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Outlook
  • 如果您已安装 Office 2013,则使用此
    注册表路径:HKEY_LOCAL_MACHINE\Software\Microsoft\Office\15.0\Outlook
  • 注册表项:Bitness
  • 值:x86 或 x64

以及同一文章中的其他位置:

从 Office 2010 开始,Outlook
可作为 32 位应用程序使用
64 位应用程序。版本
您选择的 Outlook(位数)
取决于 Windows 版本
操作系统(32 位或 64 位)
以及 Office 2010 的版本(32 或
64 位)安装在
计算机,如果 Office 已安装
安装在该计算机上。

决定可行性的因素
安装 32 位或 64 位
Outlook 版本包括
以下:

  • 您可以在受支持的 32 位或 64 位版本的 Windows 操作系统上安装 32 位 Office 2010 和 32 位 Microsoft Outlook 2010。您只能在受支持的 64 位操作系统上安装 64 位版本的 Office 2010 和 64 位 Outlook 2010。
  • 64 位版本的 Windows 操作系统上默认安装的 Office 2010 是 32 位 Office 2010。
  • 如果 Office 安装在同一台计算机上,则已安装的 Outlook 版本的位数始终与 Office 2010 的位数相同。也就是说,32 位版本的 Outlook 2010 不能安装在已安装 64 位版本的其他 Office 2010 应用程序(例如 64 位 Microsoft Word 2010 或 64 位 Microsoft Excel 2010)的同一计算机上。 ,64 位版本的 Outlook 2010 不能安装在已安装 32 位版本的其他 Office 应用程序的同一计算机上。

From TechNet article on 64-bit editions of Office 2010:

If you have installed Office 2010
including Microsoft Outlook 2010,
Outlook sets a registry key named
Bitness of type REG_SZ on the computer on which it is installed. The
Bitness registry key indicates whether the Outlook 2010 installation
is 32-bit or 64-bit. This may be
useful to administrators who are
interested in auditing computers to
determine the installed versions of
Office 2010 in their organization.

  • Registry path: HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Outlook
  • if you have installed Office 2013 then use this
    Registry path: HKEY_LOCAL_MACHINE\Software\Microsoft\Office\15.0\Outlook
  • Registry key: Bitness
  • Value: either x86 or x64

and elsewhere in the same article:

Starting with Office 2010, Outlook is
available as a 32-bit application and
a 64-bit application. The version
(bitness) of Outlook that you choose
depends on the edition of the Windows
operating system (32-bit or 64-bit)
and the edition of Office 2010 (32- or
64-bit) that is installed on the
computer, if Office is already
installed on that computer.

Factors that determine the feasibility
of installing a 32-bit or a 64-bit
version of Outlook include the
following:

  • You can install 32-bit Office 2010 and 32-bit Microsoft Outlook 2010 on a supported 32-bit or 64-bit edition of the Windows operating system. You can install the 64-bit version of Office 2010 and 64-bit Outlook 2010 only on a supported 64-bit operating system.
  • The default installation of Office 2010 on a 64-bit edition of the Windows operating system is 32-bit Office 2010.
  • The bitness of an installed version of Outlook is always the same as the bitness of Office 2010, if Office is installed on the same computer. That is, a 32-bit version of Outlook 2010 cannot be installed on the same computer on which 64-bit versions of other Office 2010 applications are already installed, such as 64-bit Microsoft Word 2010 or 64-bit Microsoft Excel 2010. Similarly, a 64-bit version of Outlook 2010 cannot be installed on the same computer on which 32-bit versions of other Office applications are already installed.
ヤ经典坏疍 2024-08-26 23:49:52

我测试了 Otaku 的答案,即使未安装 Outlook,Outlook 位数值也会被设置,尽管引用的文章没有明确表明情况会如此。

I've tested Otaku's answer and it appears that the Outlook bitness value is set even when Outlook is not installed, even though the article referenced does not clearly indicate that this would be the case.

青萝楚歌 2024-08-26 23:49:52

为了添加 vtrz 的答案,这是我为 Inno Setup 编写的一个函数:

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 '[email protected] 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;

To add to vtrz's answer, here's a function I wrote for Inno Setup:

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 '[email protected] 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;
骷髅 2024-08-26 23:49:52

遗憾的是,Otacku 和 @clatonh 的方法都不适用于我 - 注册表中既没有 Outlook Bitness,也没有 {90140000-0011-0000-1000-0000000FF1CE}(对于 64 位 Office,没有Outlook已安装)。

不过,我发现的唯一方法(不通过注册表)是使用 Windows API 函数检查 Office 可执行文件之一的位数 GetBinaryType(自 Windows 2000 Professional 起)。

例如,您可以检查Winword.exe的位数,该路径存储在
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe。

这是MFC代码片段:

CRegKey rk;
if (ERROR_SUCCESS == rk.Open(HKEY_LOCAL_MACHINE, 
  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Winword.exe", 
  KEY_READ)) {
    CString strWinwordPath;
    DWORD dwSize = MAX_PATH;
    if (ERROR_SUCCESS == rk.QueryStringValue(strWinwordPath, 
        strWinwordPath.GetBuffer(MAX_PATH), &dwSize)) {
            strWinwordPath.ReleaseBuffer();
            DWORD dwBinaryType;
            if (::GetBinaryType(strWinwordPath, &dwBinaryType)) {
                if (SCS_64BIT_BINARY == dwBinaryType) {
                    // Detected 64-bit Office 
                } else {
                    // Detected 32-bit Office 
                }
            } else {
                // Failed
            }
        } else {
            // Failed
        }
    } else {
    // Failed
}

Regret to say, but Both Otacku's and @clatonh's methods aren't working for me - neither have Outlook Bitness nor {90140000-0011-0000-1000-0000000FF1CE} in registry (for 64-bit Office without Outlook installed).

The only way I have found, though, not via the registry, is to check bitness for one of the Office executables with the use of the Windows API function GetBinaryType (since Windows 2000 Professional).

For example, you can check the bitness of Winword.exe, which path is stored under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe.

Here is the MFC code fragment:

CRegKey rk;
if (ERROR_SUCCESS == rk.Open(HKEY_LOCAL_MACHINE, 
  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Winword.exe", 
  KEY_READ)) {
    CString strWinwordPath;
    DWORD dwSize = MAX_PATH;
    if (ERROR_SUCCESS == rk.QueryStringValue(strWinwordPath, 
        strWinwordPath.GetBuffer(MAX_PATH), &dwSize)) {
            strWinwordPath.ReleaseBuffer();
            DWORD dwBinaryType;
            if (::GetBinaryType(strWinwordPath, &dwBinaryType)) {
                if (SCS_64BIT_BINARY == dwBinaryType) {
                    // Detected 64-bit Office 
                } else {
                    // Detected 32-bit Office 
                }
            } else {
                // Failed
            }
        } else {
            // Failed
        }
    } else {
    // Failed
}
梦境 2024-08-26 23:49:52

我找到了检查办公室位数的方法。

我们可以使用此注册表项检查 Office 365 和 2016 位数:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

Platform x86 for 32 bit。

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

64 位平台 x64。

请检查...

I found the way for checking office bitness .

We can check office 365 and 2016 bitness using this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

Platform x86 for 32 bit.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

Platform x64 for 64 bit.

Please check...

行至春深 2024-08-26 23:49:52

注意:如果在 .NET 环境中调用,查询 Outlook 应用程序的位数无法可靠地工作

在这里,我们在可由任何应用程序调用的 DLL 中使用 GetBinaryType():

  • 如果主机应用程序是 64 位 C/C++,则 GetBinaryType() 返回 SCS_32BIT_BINARY。
  • 如果主机应用程序是 64 位 .NET(我们在 64 位系统上测试了“AnyCPU”),则 GetBinaryType() 返回 SCS_64BIT_BINARY。

在同一台计算机上具有完全相同的 DLL 代码和完全相同的 Outlook 二进制路径(“c:/Program Files (x86)/...”)。

这意味着您可能需要使用“IMAGE_NT_HEADERS.FileHeader.Machine”条目自行测试二进制文件。

天哪,我讨厌某些 Windows API 的错误返回值(另请参阅 GetVersion() 谎言)。

Attention: querying the bitness of the Outlook Application does NOT reliably work if called in .NET environment.

Here, we use GetBinaryType() in a DLL that can be called by any application:

  • If the host application is 64 bit C/C++, GetBinaryType() returns SCS_32BIT_BINARY.
  • If the host application is 64 bit .NET (we tested "AnyCPU" on a 64 bit system), GetBinaryType() returns SCS_64BIT_BINARY.

With exactly the same DLL code and exactly the same Outlook binary path ("c:/Program Files (x86)/...") on the same computer.

Meaning that you might need to test the binary file yourself using "IMAGE_NT_HEADERS.FileHeader.Machine" entry.

God, I hate the incorrect return values of some Windows APIs (see also GetVersion() lie).

晒暮凉 2024-08-26 23:49:52

我发现了这种方法:

如果 HKLM\Software\WOW6432Node 存在,那么 Windows 是 64 位的。

如果 HKLM\Software\WOW6432Node\Microsoft\Office 存在,则 Office 是 32 位。

如果 HKLM\Software\WOW6432Node\Microsoft\Office 不存在,但 HKLM\Software\Microsoft\Office 存在,则 Office 是 64 位。

如果 HKLM\Software\WOW6432Node 不存在,则 Windows 和 Office 是 32 位。

来源:Technet 论坛

I found this approach:

If HKLM\Software\WOW6432Node exists then Windows is 64-bit.

If HKLM\Software\WOW6432Node\Microsoft\Office exists, then Office is 32-bit.

If HKLM\Software\WOW6432Node\Microsoft\Office does not exist, but HKLM\Software\Microsoft\Office does exist, then Office is 64-bit.

If HKLM\Software\WOW6432Node does not exist, then Windows and Office are 32-bit.

Source: Technet Forums

与往事干杯 2024-08-26 23:49:52

以下是我能够在 VBscript 中使用的内容来检测 Office 64 位 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

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
薄凉少年不暖心 2024-08-26 23:49:52

您可以在注册表中搜索 {90140000-0011-0000-0000-0000000FF1CE}。如果粗体数字以 0 开头,则为 x86,1 为 x64

对于我来说,它是
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-0057-0000-0000-0000000FF1CE}

You can search the registry for {90140000-0011-0000-0000-0000000FF1CE}. If the bold numbers start with 0 its x86, 1 is x64

For me it was in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-0057-0000-0000-0000000FF1CE}

Source

小红帽 2024-08-26 23:49:52

此 InnoSetup 代码适用于 Win 10x64 和 Office 2016 x86(使用“HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration”和密钥“Platform”)

[Code]
const
  RegOffice='SOFTWARE\Microsoft\Office\ClickToRun\Configuration';
  RegOfficeKey='Platform';

/// <summary>
/// Get current HKLM version
/// </summary>
function GetHKLM: Integer;
begin
  if IsWin64 then
    Result := HKLM64
  else
    Result := HKLM32;
end;

/// <summary>
/// Check is Microsoft Office is installed or not
/// </summary>
function IsOfficeInstalled (): Boolean;
var
  platform: string;
begin
  RegQueryStringValue(GetHKLM(), RegOffice, RegOfficeKey, platform);
  if platform = 'x86' then begin
   SuppressibleMsgBox('Microsoft Office found (x86 version)' , mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := True;
  end else if platform = 'x64' then begin
    SuppressibleMsgBox('Microsoft Office found (x64 version)', mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := True;
  end else begin
    SuppressibleMsgBox('Microsoft Office NOT found' + platform + '.', mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := False;
  end;
end;

This InnoSetup code is working for me under Win 10x64 and Office 2016 x86 (using 'HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' and key 'Platform')

[Code]
const
  RegOffice='SOFTWARE\Microsoft\Office\ClickToRun\Configuration';
  RegOfficeKey='Platform';

/// <summary>
/// Get current HKLM version
/// </summary>
function GetHKLM: Integer;
begin
  if IsWin64 then
    Result := HKLM64
  else
    Result := HKLM32;
end;

/// <summary>
/// Check is Microsoft Office is installed or not
/// </summary>
function IsOfficeInstalled (): Boolean;
var
  platform: string;
begin
  RegQueryStringValue(GetHKLM(), RegOffice, RegOfficeKey, platform);
  if platform = 'x86' then begin
   SuppressibleMsgBox('Microsoft Office found (x86 version)' , mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := True;
  end else if platform = 'x64' then begin
    SuppressibleMsgBox('Microsoft Office found (x64 version)', mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := True;
  end else begin
    SuppressibleMsgBox('Microsoft Office NOT found' + platform + '.', mbConfirmation, MB_YESNO or MB_DEFBUTTON1, IDYES);
    Result := False;
  end;
end;
ら栖息 2024-08-26 23:49:52

不是通过注册表,而是通过命令行工具:

https://stackoverflow.com/a/6194710/2885897

C:\Users \me>assoc .msg

.msg=Outlook.File.msg.15

C:\Users\me>ftype Outlook.File.msg.15

Outlook.File.msg.15="C:\Program Files (x86 )\Microsoft Office\Root\Office16\OUTLOOK.EXE" /f "%1"

Not via the registry but via commandline tools:

https://stackoverflow.com/a/6194710/2885897

C:\Users\me>assoc .msg

.msg=Outlook.File.msg.15

C:\Users\me>ftype Outlook.File.msg.15

Outlook.File.msg.15="C:\Program Files (x86)\Microsoft Office\Root\Office16\OUTLOOK.EXE" /f "%1"

错爱 2024-08-26 23:49:52

编辑:不触及注册表键的解决方案 - 抱歉,Op。

我发现 C# 有一个解决方案 - 原始解决方案可以在这里找到:
https:// /blogs.msdn.microsoft.com/webdav_101/2016/07/26/sample-detecting-installed-outlook-and-its-bitness/

我根据自己的需要对其进行了一些修改。

只需将正确的 OutlookPath 传递给 GetOutlookBitness()

  public enum BinaryType : uint

    {
        SCS_32BIT_BINARY = 0, // A 32-bit Windows-based application
        SCS_64BIT_BINARY = 6, // A 64-bit Windows-based application.
        SCS_DOS_BINARY = 1, // An MS-DOS – based application
        SCS_OS216_BINARY = 5, // A 16-bit OS/2-based application
        SCS_PIF_BINARY = 3, // A PIF file that executes an MS-DOS – based application
        SCS_POSIX_BINARY = 4, // A POSIX – based application
        SCS_WOW_BINARY = 2 // A 16-bit Windows-based application
    }



    [DllImport("kernel32.dll")]
    static extern bool GetBinaryType(string lpApplicationName, out BinaryType lpBinaryType);




    public int GetOutlookBitness(string FilePath)
    {
        int bitness = 0;

        if (File.Exists(FilePath))
        {
            BinaryType type;
            GetBinaryType(FilePath, out type);


            switch (type)
            {
                case BinaryType.SCS_32BIT_BINARY:
                    bitness = 32;
                    break;
                case BinaryType.SCS_64BIT_BINARY:
                    bitness = 64;
                    break;
            }
        }

        return bitness;



    }

EDIT : Solution without touching RegistryKeys - im Sorry Op.

I found out that there is a solution in C# - the original can be found here :
https://blogs.msdn.microsoft.com/webdav_101/2016/07/26/sample-detecting-installed-outlook-and-its-bitness/

I modified it a bit for my needs.

just pass the correct outlookPath to GetOutlookBitness()

  public enum BinaryType : uint

    {
        SCS_32BIT_BINARY = 0, // A 32-bit Windows-based application
        SCS_64BIT_BINARY = 6, // A 64-bit Windows-based application.
        SCS_DOS_BINARY = 1, // An MS-DOS – based application
        SCS_OS216_BINARY = 5, // A 16-bit OS/2-based application
        SCS_PIF_BINARY = 3, // A PIF file that executes an MS-DOS – based application
        SCS_POSIX_BINARY = 4, // A POSIX – based application
        SCS_WOW_BINARY = 2 // A 16-bit Windows-based application
    }



    [DllImport("kernel32.dll")]
    static extern bool GetBinaryType(string lpApplicationName, out BinaryType lpBinaryType);




    public int GetOutlookBitness(string FilePath)
    {
        int bitness = 0;

        if (File.Exists(FilePath))
        {
            BinaryType type;
            GetBinaryType(FilePath, out type);


            switch (type)
            {
                case BinaryType.SCS_32BIT_BINARY:
                    bitness = 32;
                    break;
                case BinaryType.SCS_64BIT_BINARY:
                    bitness = 64;
                    break;
            }
        }

        return bitness;



    }
卖梦商人 2024-08-26 23:49:52

我在这两个文件夹中都没有名为 bitness 的密钥。我在这两个文件夹中都有一个名为“default”的键,其值为“unset” 我的计算机附带了 Office 2010 starter(我假设是 64 位)。我删除了它并尝试完整安装 32 位 Office。我不断收到以下消息。文件不兼容,请检查您是否需要 x86 或 x64 版本的程序。

对我有什么建议吗?

I don't have a key called bitness in either of these folders. I do have a key called "default" in both of these folders and the value is "unset" My computer came with office 2010 starter (I assume 64 bit). I removed it and tried to do a full install of 32 bit office. I keep getting the following message. the file is incompatible, check to see whether you need x86 or x64 version of the program.

any advice for me?

远山浅 2024-08-26 23:49:52

@clatonh:这是我的电脑上注册表的路径:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-002A-0000-1000-0000000FF1CE}
而且它绝对是 64 位操作系统上的 32 位安装。

@clatonh: this is the path of the registry on my PC:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-002A-0000-1000-0000000FF1CE}
and it's definitely a 32-bit-installation on a 64-bit OS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文