Old 27th December 2012, 10:46   #1
amihud
Junior Member
 
Join Date: Aug 2010
Posts: 6
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
amihud is offline   Reply With Quote
Old 27th December 2012, 19:48   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Does $WINDIR\system32\PnPutil.exe exist?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 28th December 2012, 11:50   #3
amihud
Junior Member
 
Join Date: Aug 2010
Posts: 6
Quote:
Originally Posted by Anders View Post
Does $WINDIR\system32\PnPutil.exe exist?
Sure. when running it from cmd Windows shell it works fine
amihud is offline   Reply With Quote
Old 30th December 2012, 07:00   #4
amihud
Junior Member
 
Join Date: Aug 2010
Posts: 6
Quote:
Originally Posted by amihud View Post
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
amihud is offline   Reply With Quote
Old 30th December 2012, 08:02   #5
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
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).
redxii is offline   Reply With Quote
Old 30th December 2012, 11:02   #6
amihud
Junior Member
 
Join Date: Aug 2010
Posts: 6
Quote:
Originally Posted by redxii View Post
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
amihud is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump