我想在 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 的位置取决于安装程序的位数:
更多信息在这里:
http://www.samlogic.net/articles/sysnative-folder-64-bit-windows.htm
关于windows-7 - PnPUtil.exe 在 64 位系统中的位置是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8253713/