How to conditionally show the "StartMenuShortcutsDlg" dialog

ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

When you use the "ShortcutsDlg" dialog, it is also a good idea to let the user choose the folder in which he wants to install the Start menu shortcuts. For this, you can use the "StartMenuShortcutsDlg" dialog. However, it should not be showed if the user doesn't want to create a Start menu shortcut. This can be done using control events:

  1. go to the Dialogs page and add the "ShortcutsDlg" and "StartMenuShortcutsDlg" dialogs
  2. make sure that "ShortcutsDlg" is above the "StartMenuShortcutsDlg" dialog and both dialogs are under "FolderDlg"
  3. select the "StartMenuShortcutsDlg" dialog
  4. from the context menu select the "Show only if..." option
  5. in the Edit Condition Dialog under the "Condition" field write AI_STARTMENU_SH
  6. build and test the package

This way the "StartMenuShortcutsDlg" dialog is showed only if the "Start Menu Programs folder" option is checked on the "ShortcutsDlg" dialog.