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

前端 未结 1 330
囚心锁ツ
囚心锁ツ 2021-01-16 01:12

I am using Inno Setup installer to setup an installer file, that can invoke the .exe that I just installed through its scripting, and launch it right after installation, wit

相关标签:
1条回答
  • 2021-01-16 01:50

    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.

    0 讨论(0)
提交回复
热议问题