What is the "correct" way to do non-advertised shortcuts? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

What is the "correct" way to do non-advertised shortcuts?

Our old installer had a bunch of shortcuts on the desktop and in Start > Programs > OurApp. I'd like these to be available to all users, as many of our users share workstations. By default, shortcuts are placed in the profile of the user (or administrator) that installed the software, i.e. per-user, not per-machine. As far as I know, you can't install them per-machine, as this requires administrator privileges and our users don't have administrator privileges. Is that right, or am I missing something?

Our old installer had a heap of validation errors, including ICE43 (non-advertised shortcuts with a file as keypath). I changed those to advertised shortcuts, but this hid some of the shortcut properties and disabled a couple of buttons in the Properties window. Not nice.

What is the "correct" way to either:
- install per-machine shortcuts, or
- install per-user, non-advertised shortcuts.
I know that the latter is supposed to have a registry key in the HKCU hive, but where exactly and what should the keyname and value be? And what happens when a new user account is created or a different user does an upgrade or uninstallation?

A step-by-step guide to the "correct" way of installing non-advertised shortcuts for all users would be nice. :)
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What is the "correct" way to do non-advertised shortcuts?

Hi,
As far as I know, you can't install them per-machine, as this requires administrator privileges and our users don't have administrator privileges. Is that right, or am I missing something?
Yes, this is correct. In order to install a shortcut for all the users you need to create a per-machine installation package. Since this type of package requires Administrator privileges, normal users cannot install the package.
I changed those to advertised shortcuts, but this hid some of the shortcut properties and disabled a couple of buttons in the Properties window.
Can you please give me more details about this? Please note that marking a shortcut as Advertised will not disable or hide options in the "Edit Shortcut Properties" dialog.
install per-machine shortcuts
This can be done by creating a per-machine installation package. Note that this type of package requires Administrator privileges.
install per-user, non-advertised shortcuts.
This can be done by creating shortcuts to installed files in the Files and Folders page. Note that you can create a shortcut by using the shortcut wizard, the "New Shortcut" button on the toolbar or the "New Shortcut" context menu. Also, in the Organization page you need to make sure that the key member of the component of the shortcut is a registry entry (you can use any registry entry under HKEY_CURRENT_USER).
I know that the latter is supposed to have a registry key in the HKCU hive, but where exactly and what should the keyname and value be?
It doesn't matter what registry value you use as long as it is installed in the HKEY_CURRENT_USER registry hive. Also, this registry entry must be set as the key member of the component which contains the shortcuts (you can use the "Make Key Member" context menu).
And what happens when a new user account is created or a different user does an upgrade or uninstallation?
Please note that per-user installations can be accessed only by the user which installed the package. Also, per-machine installations can be modified by anyone that has enough privileges.
A step-by-step guide to the "correct" way of installing non-advertised shortcuts for all users would be nice.
We will add this how-to to the User Guide in a future version of Advanced Installer. Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

Re: What is the "correct" way to do non-advertised shortcuts?

Can you please give me more details about this? Please note that marking a shortcut as Advertised will not disable or hide options in the "Edit Shortcut Properties" dialog.
Sorry. I probably didn't make myself clear. I wasn't implying there was a problem in Advanced Installer. I meant that after you've installed the software, if you right-click on an advertised shortcut and choose Properties from the shortcut menu, the Target property, Find Target button and Change Icon button are disabled in the Properties window.
Also, this registry entry must be set as the key member of the component which contains the shortcuts (you can use the "Make Key Member" context menu).
So, if the shortcut needs to be the key, it will need to be in a separate component to the executable. Correct? This is because the executable needs to be the key of its component so that it can be repaired, if necessary. If you have a desktop shortcut and a Start > Programs shortcut, then they will each need their own component so that they can both be a key.

Thanks for the help.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What is the "correct" way to do non-advertised shortcuts?

Hi,
if you right-click on an advertised shortcut and choose Properties from the shortcut menu, the Target property, Find Target button and Change Icon button are disabled in the Properties window.
These options are disabled because the target of an Advertised shortcut is a feature. Therefore, the target cannot be modified and it cannot be found. Also, by default the shortcut gets its icon from its target. Since an Advertised shortcut has a feature as target, it cannot get its icon. The solution is to set a custom icon for the shortcut before you build the project.
So, if the shortcut needs to be the key, it will need to be in a separate component to the executable. Correct?
Not exactly. You can simply add a HKEY_CURRENT_USER registry value in the component of the shortcut and its target. After this, you can set the registry value as the key member and the component will have three resources: the registry value, the shortcut and its target.
This is because the executable needs to be the key of its component so that it can be repaired, if necessary.
Perhaps you are referring to an advertised shortcut. Please note that only non-advertised shortcuts require the registry value as the key member (an advertised shortcut requires its target as the key member) .

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”