64 位系统中 PnPUtil.exe 的位置是什么?
我想在 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 位平台上的路径始终相同?那么维斯塔呢?
I would like to install my USB device driver [.inf file] using PnPUtil.exe utility on both 32bit and 64bit systems for Windows Vista and Windows 7.
I tested on my machine [Windows 7 32bit] and everything was fine because PnpUtil.exe is located in: C:\Windows\System32\PnPUtil.exe.
But in 64bit Windows 7 the utility is not in this directory.
When I tried installing driver on different Windows 7 - 64bit machine I could found PnPUtil.exe in this location: C:\WIndows\winsxs\amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15\pnputil.exe
and the test was also fine.
So how can I exactly detect this directory on all platforms?
I noticed the path is dependent on built of Windows version - 6.1.7600.16385 - but how to detect the rest of path?
Or is the path always the same on all 64 bit platforms? And what about Vista?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从安装程序应用程序中看到的 PnPUtil.exe 的位置取决于安装程序的位数:
更多信息请参见:
http://www.samlogic.net/articles/sysnative-folder -64位-windows.htm
The location of PnPUtil.exe seen from you installer application depends on the bitness of your installer:
More info here:
http://www.samlogic.net/articles/sysnative-folder-64-bit-windows.htm
我最近在尝试为 ReplicatorG 创建安装程序时遇到了这个问题,其中包括 Arduino 驱动程序和一些特定于 Makerbot Replicator 的驱动程序。
似乎没有任何方法可以确定 PnPutil 的位置,而我不得不获取 Microsoft 的 DIFx 并使用他们的可再发行 DPinst。
DPinst 有一些奇怪的事情导致它很难使用。首先,如果它位于路径中有空格的目录树中,它似乎无法正常运行。谁知道为什么。第二个问题是,由于 Arduino 驱动程序未签名,因此需要在传统模式下运行,以避免弹出一个大的红色对话框警告用户。要在旧模式下运行它,您可以使用
/lm
标志,但该标志必须是小写。再次,尚不清楚原因。最后,我让安装程序将 dpinst 和每个驱动程序复制到临时目录中的一个文件夹中,然后运行 dpinst。它会弹出一个漂亮的小向导并告诉用户安装了哪些驱动程序。
I recently came across this problem while trying to create an installer for ReplicatorG, which includes the Arduino drivers and some drivers specific to the Makerbot Replicator.
It seemed that there isn't any way to determine the location of PnPutil, and I instead had to acquire Microsoft's DIFx and use their redistributable DPinst.
There were a couple of strange things about DPinst that made it difficult to use. The first is that it didn't seem to run properly if it was located in a directory tree with spaces in the path. Who knows why. The second was that, because the Arduino drivers are unsigned, it needed to be run in legacy mode to keep from popping up a big, red dialog warning the user. To run it in legacy mode you use the
/lm
flag, but the flag must be lowercase. Again, it's unclear why.In the end, I had the installer copy dpinst and each of the drivers to a folder in the temporary directory and then run dpinst. It pops up a nice little wizard and tells the user which drivers were installed.
从 C:\WIndows\winsxs\
dir /s PnPUtil.*
将扫描子目录
From C:\WIndows\winsxs\
dir /s PnPUtil.*
will scan subdirectories