Archive: pnputil error


pnputil error
Hi,
When running pnputil from NSIS (nsExec::ExecToLog '"$WINDIR\system32\pnputil.exe" -i -a "$INSTDIR\myinf.inf"' I got an error which says "is not recognized as an internal or external command"

I tried also to run it from batch but it failed:
ExpandEnvStrings $0 %COMSPEC%
nsExec::ExecToLog '$0 /c "$WINDIR\system32\PnPutil.exe" -i -a "$INSTDIR\myinf.inf"'

I have read other also faced it but i didn't find solution.
Any idea? work around?

Thanks


Does $WINDIR\system32\PnPutil.exe exist?


Originally posted by Anders
Does $WINDIR\system32\PnPutil.exe exist?
Sure. when running it from cmd Windows shell it works fine

Originally posted by amihud
Hi,
When running pnputil from NSIS (nsExec::ExecToLog '"$WINDIR\system32\pnputil.exe" -i -a "$INSTDIR\myinf.inf"' I got an error which says "is not recognized as an internal or external command"

I tried also to run it from batch but it failed:
ExpandEnvStrings $0 %COMSPEC%
nsExec::ExecToLog '$0 /c "$WINDIR\system32\PnPutil.exe" -i -a "$INSTDIR\myinf.inf"'

I have read other also faced it but i didn't find solution.
Any idea? work around?

Thanks
One More think:
It is working on Windows 7 32bit but fail on Windows 7 64-bit

It looks like pnputil installs drivers. For 64-bit make sure you are trying to install a 64-bit driver. You can also try putting '${DisableX64FSRedirection}' and '${EnableX64FSRedirection}' around whatever command you're using (you need to include x64.nsh).


Originally posted by redxii
It looks like pnputil installs drivers. For 64-bit make sure you are trying to install a 64-bit driver. You can also try putting '${DisableX64FSRedirection}' and '${EnableX64FSRedirection}' around whatever command you're using (you need to include x64.nsh).
Thanks!!
${DisableX64FSRedirection} solved it