2
votes

I'm using Inno Setup to make installer for my Django webapp created using PyInstaller. Since my application needs a command (command-line console application) to run a server, I wrote a batch script to accomplish that. My problem is I don't want to show console window to end user, I want to make it hidden.

Inno Setup .iss file:

[Run]
Filename: "{app}\cookie_dot.bat"; Description: "Start server"; \
    Flags: nowait postinstall runhidden skipifsilent

But it still shows a console window.

For more details, my batch file:

set PATH=%PATH%;C:\cookie_dot\wkhtmltopdf.exe
START "" "http://localhost:88/"
START "" "C:\cookie_dot\cookie_dot.exe" runserver localhost:88
1
Sorry @MartinPrikryl This Is created using Wizard, ill post the full and new iss file - skysoft999
Please have a look on my new edits @MartinPrikryl - skysoft999
What is cookie_dot.exe? Is that a console application? - Martin Prikryl
Yes @MartinPrikrylits , its a web app from that i made exe(Django app collected using pyinstaller) - skysoft999

1 Answers

2
votes

The runhidden hides a console window of the batch file (cmd.exe).

But you start yet another console application (cookie_dot.exe) in a separate console window (due to the start command).

Note that if you remove the runhidden flag, you will get two console windows (though the first one shows just briefly, while the batch file is running).


You do not need to use the start command for cookie_dot.exe, as you use nowait flag, so Inno Setup won't mind that the (hidden) batch file stays running as long as the cookie_dot.exe runs:

set PATH=%PATH%;C:\cookie_dot\wkhtmltopdf.exe
START "" "http://localhost:88/"
"C:\cookie_dot\cookie_dot.exe" runserver localhost:88

Without the start command, the cookie_dot.exe inherits the hidden console window of the batch file (cmd.exe).