1

I'm creating an desktop icon and an autostart entry with an Inno Setup script like this:

[Icons]
Name: "{commonstartup}\abc"; Filename: "{app}\xyz.exe"; WorkingDir: "{app}"; Flags: createonlyiffileexists; Tasks: StartMenuEntry
Name: "{commondesktop}\abc"; Filename: "{app}\xyz.exe"; WorkingDir: "{app}"; IconIndex: 0; Tasks: desktopicon

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "StartMenuEntry"; Description: "{cm:AutoStartProgram}"; GroupDescription: "{cm:AutoStartProgramGroupDescription}"

Some users want to run my setup.exe from the command line. They want to add a parameter for silent installation /VERYSILENT and a parameter for disabling the desktop icon and the autostart entry.

Is that possible with a command line parameter? If not: What else is possible to do that? Thanks!

TomCat500
  • 153
  • 3
  • 11

1 Answers1

1

Use /TASKS or better /MERGETASKS command-line switches to alter the default task selection.

Particularly, to disable particular task, use /MERGETASK=!taskname:

mysetup.exe /VERYSILENT /MERGETASKS=!desktopicon,!StartMenuEntry

Related question: Command line switch to prevent Inno Setup installer from creating desktop Icon

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992