In a innosetup installer, my goal is to configure the Windows firewall to open the adequate port for my software
[Run]
Filename: "{sys}\netsh.exe"; Parameters: "firewall set portopening protocol=TCP port=""{code:GetServerPort()}"" name=NxTCP mode=ENABLE"; StatusMsg: "Opening TCP Port ""{code:GetServerPort()}"; Flags: runhidden
[Code]
function GetServerPort(): String;
begin
Result := "5555"; //obtained with the Wizard
end;
And I get this error
Required function or procedure 'GetServerPort()' not found.
Or if I drop the ()
at the call
Invalid prototype for 'GetServerPort'