问题
The following NSIS line refuses to run for some reason (returns immediately) under Windows XP:
ExecWait ' "$PROGRAMFILES\Common Files\Microsoft Shared\MSInfo\msinfo32" /report "$DESKTOP\msinfo.log" '
If I run msinfo32 in the command line, it runs properly:
C:\Documents and Settings\Admin> "%PROGRAMFILES%\Common Files\Microsoft Shared\MSInfo\msinfo32" /report "%APPDATA%\..\Desktop\msinfo.log"
Why?
And how do I make it work?
回答1:
Remove spaces after single quotes and add .exe for msinfo. Worked for me.
回答2:
ExecWait '"$COMMONFILES\Microsoft Shared\MSInfo\msinfo32" /report "$temp\msinfo.log"'
Like sha says, remove whitespace, and you should be using the $COMMONFILES[32/64] constant, not $PROGRAMFILES
来源:https://stackoverflow.com/questions/4597125/msinfo32-wont-run-in-nsis-under-windows-xp