Reputation: 309
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.
Upvotes: 0
Views: 1564
Reputation: 6032
You have to call pnputil using %windir%\sysnative\pnputil.exe
instead.
Upvotes: 3