akangas
Posts: 5
Joined: Wed Feb 04, 2009 11:09 am

Shortcut name with install parameter

Hi,

I have a problem with shortcut creation with install parameter. I created property to install parameters and then it's value is set at install time by vbscript. But when installer runs the shortcut name is created with original property value (not with the value set by vbscript). Is it a bug or am I doing something wrong?

/Arto
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Shortcut name with install parameter

Hi Arto,

Most likely you have defined a Private Property instead of a Public one. Make sure that you are using a Public Property (only upper-case letters in its name).

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
akangas
Posts: 5
Joined: Wed Feb 04, 2009 11:09 am

Re: Shortcut name with install parameter

Thanks for your reply. That private/public property information was new to me. Nice to know it works that way ;) Anyway, my property has only upper-case letters in its name.

Regards,
Arto
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Shortcut name with install parameter

Hi Arto,

The shortcuts are created during the "InstallExecuteSequence" -> "CreateShortcuts" standard action. You can show it by using the "Show Standard Action" button on the toolbar of the "Custom Actions" page. Therefore, your custom action should be scheduled under "InstallExecuteSequence" -> "CreateShortcuts".

Also, only Immediate custom actions have access to installer properties. If the custom action runs as deferred, it will not be able to change the property you are using.

If your custom action is configured this way and the problem persists, please send us the AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akangas
Posts: 5
Joined: Wed Feb 04, 2009 11:09 am

Re: Shortcut name with install parameter

Hi AI Team,

I think I had my project done the way you adviced. I'll just make second check on this and if I cannot make it work, I will send you my project files. I also tried it with label on UI dialogs and parameter changed as expected.

Regards,
Arto
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Shortcut name with install parameter

Hi Arto,

I checked with our development team and it seems that the shortcut names can use only pseudo-formatted properties (they are resolved when the project is built). Therefore, a shortcut name cannot be modified during the installation (it is set when the package is created).

However, you can try using a custom action to rename the shortcut after it is created. You can find some sample VBScript code here. Please note that in this case the custom action should be scheduled under "InstallExecuteSequence" -> "InstallFinalize".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akangas
Posts: 5
Joined: Wed Feb 04, 2009 11:09 am

Re: Shortcut name with install parameter

Ok and thanks. I will try the way suggested.

Is this shortcut naming limited by windows installer or is the issue related to AI?

Regards,
Arto
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Shortcut name with install parameter

Hi Arto,

Unfortunately the limitation is in Windows Installer. The "Name" field in the Shortcut table needs to be a filename, which is basically a text string.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akangas
Posts: 5
Joined: Wed Feb 04, 2009 11:09 am

Re: Shortcut name with install parameter

Yes, I supposed that it is the case. Anyway, this helped me to solve the problem.

Best regards,
Arto

Return to “Common Problems”