We provide a custom Wizard page in our InnoSetup configuration that gives us an InstallForAllUsers
variable. Based on the value of this variable, we want to place our icons in the appropriate places Common Desktop
/Common Startup
for All Users, and User Desktop
/User Startup
for Current User.
Our Icons section looks like this:
[Icons]
Name: "{group}\MyApp"; Filename: "{app}\MyApp.exe"; IconFilename: "{app}\MyApp.exe"
Name: "{group}\{cm:UninstallProgram,MyApp}"; Filename: "{uninstallexe}"; IconFilename: E:\Continuous Integration\InnoSetup Files\icon.ico
Name: "{commondesktop}\MyApp"; Filename: "{app}\MyApp.exe"; IconFilename: "{app}\MyApp.exe"
Name: "{commonstartup}\MyApp"; Filename: "{app}\MyApp.exe"; IconFilename: "{app}\MyApp.exe"
How can I leverage my InstallForAllUsers
variable to replace these constants when necessary?