windows-7 - PnPUtil.exe 在 64 位系统中的位置是什么?

标签 windows-7 windows-vista 32bit-64bit

我想在 Windows Vista 和 Windows 7 的 32 位和 64 位系统上使用 PnPUtil.exe 实用程序安装我的 USB 设备驱动程序 [.inf 文件]。

我在我的机器 [Windows 7 32 位] 上进行了测试,一切都很好,因为 PnpUtil.exe 位于: C:\Windows\System32\PnPUtil.exe .
但在 64 位 Windows 7 中,该实用程序不在此目录中。

当我尝试在不同的 Windows 7 - 64 位机器上安装驱动程序时,我可以在以下位置找到 PnPUtil.exe: C:\WINdows\winsxs\amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15\pnputil.exe
并且测试也很好。

那么我怎样才能在所有平台上准确地检测到这个目录呢?
我注意到路径依赖于构建的 Windows 版本 - 6.1.7600.16385 - 但是如何检测路径的其余部分?
还是所有 64 位平台上的路径始终相同?那么Vista呢?

最佳答案

从安装程序应用程序中看到的 PnPUtil.exe 的位置取决于安装程序的位数:

  • 32 位 Windows 上的 32 位安装程序:%WinDir%\System32
  • 64 位 Windows 上的 64 位安装程序:%WinDir%\System32
  • 64 位 Windows 上的 32 位安装程序:%WinDir%\Sysnative(Windows Vista 及更高版本)

  • 更多信息在这里:
    http://www.samlogic.net/articles/sysnative-folder-64-bit-windows.htm

    关于windows-7 - PnPUtil.exe 在 64 位系统中的位置是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8253713/

    相关文章:

    c - 这种在 64 位系统中获取字符串一部分的方法合法吗?

    java - 如何通过双击 Windows 7 64 位来运行 .jar 文件?

    mysql - 使用ODBC的VB6程序在Win7 64位无法运行

    windows-vista - 现代操作系统上的 FAT-16

    asp.net - 由于 Windows Vista Home Premium 版本缺少 Windows 身份验证 IIS 组件...有修复吗?

    c++ - 为什么 Visual Studio 在 64 位平台上链接 MSVCR90.dll (x86)?

    windows - 如何使用指定程序从命令行打开文件?

    powershell - Powershell函数返回字符串,但客户端获取数组

    .net - 在Windows Vista上安装'WCF HTTP Activation'失败?

    excel - 确保您的 VBA 代码兼容 64 位