There is a script that adds a port to the Windows Firewall and an installer for InnoSetup that runs this script as an administrator.
script.vbs:
Dim objShell Set objShell = WScript.CreateObject("Wscript.Shell") objShell.run "netsh advfirewall firewall add rule name=Test protocol=TCP localport=5433 action=allow dir=IN" Run in InnoSetup:
[Run] Filename: "{tmp}\script.vbs"; Flags: shellexec runascurrentuser; How can I run a script without a console pop-up window ?
runhiddenflag. - Yaantshellexecflag, and runnetshdirectly with the necessary parameters? - Yaantshellexecflagshellexeccallwscript.exedirectly with parameters. Or better,cscript.exe, because there is a suspicion that the window opens itselfwscript.exe- Yaantrunhiddenis still needed. And still it is worth tryingexecinstead ofrun. By the way, it may turn out that it will be enough to useexecin the original version to solve the problem. - Yaant