msinfo32 won't run in NSIS under Windows XP

一曲冷凌霜 提交于 2019-12-13 15:53:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!