Variables and Create Shortcut

Got a problem you cannot solve? Try here.
mqk
Posts: 18
Joined: Mon Aug 15, 2005 7:57 am

Variables and Create Shortcut

Postby mqk » Tue Aug 30, 2005 6:53 am

Hi

I have question regarding variables and Create Shortcut. I defined a variable as follows:

Set Variable MYSHORTCUT to Start application


I tried to use MYSHORTCUT variable in text field: Link Name of Create Shortcut command as follows:

Create Shortcut $SHORTCUTFOLDER$\\$MYSHORTCUT$ to $UNINSTALLLINK$

But unfortunately the result was $MYSHORTCUT$ and not Start application!!!

Moreover, I got the same result, when I used variables in Title, Subject and Author of Summary Information page, and same thing in Publisher Name, Contact Name, Help link and Product Updates Link of Add-Remove Programs page.

Any help will be great,

Thanks in advance,

Best Regards,
mqk

sinan
Site Admin
Posts: 1029
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Tue Aug 30, 2005 9:25 am

You cannot use variables in the Project Options dialog fields. These values are hard coded. Values may only be used in the script.

As for the Create Shortcut problem...unfortunately the name of the shortcut cannot be made dynamic (variable-based), this is an MSI limitation. That is why you had that problem. Otherwise, variables work normally.

camelo
Posts: 7
Joined: Sun Jul 23, 2006 11:17 pm

Postby camelo » Thu Oct 19, 2006 1:13 am

What I am doing to get around the no-variables-in-shortcuts-name problem is calling MoveFile in kernel32.dll to rename the shortcut to the desired name. The only catch is that you have to rename it back to the original name during uninstall for it to be removed as expected.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Oct 19, 2006 4:22 am

That's pretty creative :)
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 31 guests