I'm using Inno Setup to run pnputil.exe utility. Here is my code:
Exec(ExpandConstant('{app}') + '\driver_install.bat','"'+'pnputil'+'"','',SW_SHOW,ewWaitUntilTerminated,ResultCode);
The driver_install.bat contains the following:
echo off
echo "PLEASE WAIT WHILE DRIVERS WILL BE INSTALLED"
%~1
echo "IT MAY TAKE 5-10 min"
PAUSE
I'm passing the parameter "pnputil" to the bat file. I'm using bat file because i want user to see the output. The problem is that on windows 8 i get
'pnputil' is not recognized as an internal or external command,
operable program or batch file.
When i change the pnputil to cmd the output is fine. The administrator rights are not the cause here because pnputil can be launched from console without administrator rights.
您必须改为使用%windir%\\sysnative\\pnputil.exe
调用pnputil。
I will leave this article here which explains the details
http://www.samlogic.net/articles/sysnative-folder-64-bit-windows.htm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.