Is it possible to only apply this task if setup is not running silently. I've already tried adding the flags attribute, but is not applicable to anything other than RUN directive.
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}";
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon;
Use the Check parameter with the WizardSilent function.
[Tasks]
Name: "desktopicon"; ... ; Check: not WizardSilent
Related
I need to change the name of desktop application shortcut when I publish the next release of the application. I am updating my Inno Setup configuration file and I generated a new shortcut with the new name but the old shortcut is not updated or deleted.
Can I use some task or function to do it?
This my current configuration for shortcut icon.
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
...
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Use [InstallDelete] section entry to delete the unwanted/old shortcut/file:
[Icons]
Name: "{commondesktop}\New Shortcut"; Filename: "{app}\{#MyAppExeName}"; \
Tasks: desktopicon
[InstallDelete]
Type: files; Name: "{commondesktop}\Old Shortcut.lnk"
When I run my Inno Setup script, it always creates a desktop icon regardless of whether I check the "Create a desktop icon" or not.
Here is the applicable part of the script:
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
[Icons]
Name: "{group}\{#MyAppName} "; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{#MyAppName} Users Guide"; Filename: "{pf32}\Ishmael\Ishmael 2.5\Ishmael 1.0 Users Guide.pdf";
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{pf32}\Ishmael\Ishmael 2.5\bin\SpermBlow.ico"
Thanks,
Curtis
This entry in unconditional:
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{pf32}\Ishmael\Ishmael 2.5\bin\SpermBlow.ico"
So it indeed always creates the icon, no matter if you check the "Create a desktop icon" or not. It's missing Tasks: desktopicon condition.
I'm not sure what you wanted to achieve by the two entries with the same name.
Maybe you just need to combine them to one:
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; \
IconFilename: "{pf32}\Ishmael\Ishmael 2.5\bin\SpermBlow.ico"; Tasks: desktopicon
The above will create the icon conditionally, based on the specified task, using a custom icon file.
I have the following [Icons] section in my Inno Setup script:
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\IA_Desktop.exe"; WorkingDir: {app}
Name: "{group}\{#MyAppName}"; Filename: "{app}\IA_Desktop.exe"; WorkingDir: {app}
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}
I would expect that the order of the icons in the Start Menu -> group would be:
MyAppName
MyAppUrl
Uninstall
But instead I get:
MyAppUrl
Uninstall
MyAppName
What settings or other code do I need to use to set the order of the icons in the group?
Thanks!
I am setting up an installer for node-webkit desktop app. I have successfully created an app shortcut but I can't create a desktop shortcut because it requires an exe file. I am passing working directory reference to nw.exe in shortcut it works fine but there seems no option for creating a custom desktop icon. Here is my inno setup config file:
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}/node-webkit/nw.exe" ; Parameters: "."; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppIcon}"
Following code creates a desktop shortcut. Is there any way I can pass above icon reference to desktop icon?
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Here is the answer if anyone is looking for a solution. Thanks TLama.
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "your.exe" ; Parameters: "."; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppIcon}"; Tasks: desktopicon
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
What to change so that this part of code displays icon in desktop?
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent