To specify icon parameters there's the Parameters
parameter available for [Icons]
section entries. The rest remains same as you already used. Just two notes; replace those environment variables by the corresponding path constants given by the Inno Setup scripting engine and be careful when using those variables when you're going to expand a file name with forward slashes (file://%userprofile%/..
). Wouldn't such command line parameter fail in app. because it expands the path with baskslashes ?
In this script both mentioned issues should be considered:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
[Icons]
Name: "{commondesktop}\SDK"; Filename: "{localappdata}\Google\Chrome SxS\Application\chrome.exe"; Parameters: "{code:GetParameters}"
[Code]
function ForwardSlashes(const Value: string): string;
begin
Result := Value;
StringChangeEx(Result, '\', '/', True);
end;
function GetParameters(Value: string): string;
var
S: string;
begin
S := ForwardSlashes(ExpandConstant('file://{userdesktop}/web/index.html'));
Result := Format('--app=%s --disable-web-security', [S]);
end;