adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Modified StartMenuShortcutsDlg

I've modified the StartMenuShortcutsDlg to include checkboxes which set AI_DESKTOP_SH and AI_STARTMENU_SH. When I uncheck both check boxes, I still get a shortcut appearing on my desktop (whether or not that shortcut is advertised). I do NOT get the shortcut in the start menu when unchecking its checkbox, but do when I leave its checkbox checked. Is there anything other than modifying AI_DESKTOP_SH which needs to be done in order to suppress creation of the desktop shortcut? I don't see anything happening in the original ShortcutsDlg.

I've verified the value of AI_DESKTOP_SH by placing a static text field with its value in it on the following dialog and it's getting values of "1" and "" (where the double quotation marks are used here to delimit, they do not appear in the actual value).

Toggling the Start Menu Programs Folder checkbox works (I've added published events to the next button to make that happen), but the Desktop checkbox does not.
Attachments
testApplication.aip
Mini application illustrating the shortcut issue
(16.48 KiB) Downloaded 380 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Modified StartMenuShortcutsDlg

Hello,

Please keep in mind that only the "ShortcutsDlg" predefined dialog has functionality to allow you select whether to install or not the shortcuts. You cannot modify the "StartMenuShortcutsDlg" dialog to achieve the same functionality. This is because our "ShortcutsDlg" predefined dialog also uses a series of custom actions in order to handle the shortcuts creation. So, you should add the "ShortcutsDlg" dialog to your dialogs chain in order to achieve what you need.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Re: Modified StartMenuShortcutsDlg

Could you detail the steps needed for the desktop shortcut? I am having a similar issue. The desktop shortcut is the only one the user should be able to toggle. However, I didn't want to add a dialog for just one checkbox. When I copy the checkbox to another dialog, unchecking it has no effect; the shortcut is always created.

AI - 11.5 59981
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Modified StartMenuShortcutsDlg

Hello,

If you need to install a shortcut depending on a check box control state, then you can try to implement the workaround exposed in our "Create Shortcut based on checkbox status" thread.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”