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?
Best Answer
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