Page 1 of 1

Using variable value for branding

Posted: Tue Oct 23, 2012 8:11 am
by biscuits
Hi,

We are trying to set a variable which holds a branding value that we can then use for a desktop shortcut, etc. This is so we can then change the variable depending on the organisation who needs the installer without having to create the copies of the installer for each of the organisations.

For example:
Set Variable BRANDING to Northwind
Create Shortcut $DESKTOPDIR$\%BRANDING% Application to $TARGETDIR$\DocBinder.exe

I hoped this would create a shortcut on my desktop "Northwind Application" but instead it created "%BRANDING Application". I have tried $, &, #, { and [ but no luck.

Is this possible and if so how?

Thanks

Re: Using variable value for branding

Posted: Tue Oct 23, 2012 9:27 am
by FrancescoT
Dear User,

I suppose that this happens because you should use your variable as $BRANDING$ and not as you are doing with: %BRANDING%.

Regards

Re: Using variable value for branding

Posted: Wed Oct 24, 2012 1:21 am
by biscuits
Thanks for replying FrancescoT but as I mentioned I tried $BRANDING$, i.e. "I have tried $, &, #, { and [ but no luck."

Are you saying that $BRANDING$ should work because it isn't for me?

I assume you have tried this and seen it work so can you send a snippet of your working code through so I can check for any differences. Also can you point me to the link to the help file where this is referenced because I couldn't find anything when I searched.

Thanks

Re: Using variable value for branding

Posted: Wed Oct 24, 2012 7:55 am
by FrancescoT
Dear User,

...ops!! :roll:

With the Windows Installer engine, no variables are allowed in "Shortcut Name" field. With the Native Engine, variables are allowed in this field.

By the way, you can use compiler variable and doing this, it will work with Windows Installer engine as well.

Please use the enclosed test project that demostrates how to use a Compiler Variable to define an Application Name.
With the sample I defined a compiler variable named "BRANDING" and I used it to define the ShortCut Link name also.

Hope this helps you.

Regards

Re: Using variable value for branding

Posted: Wed Oct 24, 2012 9:04 am
by biscuits
Hi FrancescoT,

Thanks for your reply I've just tried it and it works perfectly.

Re: Using variable value for branding

Posted: Wed Oct 24, 2012 9:14 am
by FrancescoT
:D :D :D