Under the [Run] section in the Inno Setup script I have the following...
[Run]
Filename: "{sys}\cscript.exe"; \
Parameters: """{tmp}\myScript.vbs"" ""{code:GetStringValue}"" {#CONST_PORT}"; \
Description: "Setting the port to {#CONST_PORT}."; \
StatusMsg: "Setting the port to {#CONST_PORT}."; \
Tasks: SetPorts; \
Check: SetPort({#CONST_PORT}); \
Flags: runhidden;
Then in the [Code] section I have the following...
[Code]
function GetStringValue: String;
var
version: Integer;
begin
version := 20;
result := 'This is a test showing the int ' + IntToStr(version);
end;
The object is to have a function that will return a string in the [Run] section. Currently from everything I can tell if using {code:} in the [Run] section you are required to call a function that only returns a Boolean value. Is there a way around this? I need to be able to get a dynamic string to pass to my VBScript in the [Run] section.