How to run a CMD command without openning a new window in Inno Setup

柔情痞子 提交于 2019-12-01 02:20:15

It does not look like you need the cmd.exe for anything. Run your application directly instead:

[Run]
Filename: "{app}\my.exe"; Parameters: "-c ""{app}\default.conf""" \
    Description: "{cm:LaunchProgram,3mtxmail}"; \
    Flags: nowait postinstall skipifsilent runascurrentuser; 

Though if your application is a console application, it will open its own console. To prevent that, add runhidden flag.

You can actually use the runhidden flag to hide even the cmd.exe console window. But if you have no need for the cmd.exe, you should not use it.

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