Thanks for your help. I found a solution that works for me.

I splited the Name into two parts, the part before the ProductName and 
the part after the ProductName. Instead of [ProductName] i define. Into 
the Name attribute I put 
!(loc.textPart1)$(var.myProductName)!(loc.textPart2). That version works 
best for me because we have a multi-language installer that is 
configured by a script for different programm versions. I just didn't 
want to script some manipulation for the wxl files to change the 
ProductName in there.
So thanks for your input.

Andreas Hellwig


Neil Enns schrieb:
> Andreas,
>
> Another option is to make ProductName a localization string in your wxl file. 
> Then use !(loc.ProductName) everywhere, including in the Product element. 
> This is what we do and it works like a charm.
>
> Neil
>
>
> -----Original Message-----
> From: Andreas Hellwig <[EMAIL PROTECTED]>
> Sent: Tuesday, July 01, 2008 8:02 AM
> To: General discussion for Windows Installer XML toolset. 
> <wix-users@lists.sourceforge.net>
> Subject: Re: [WiX-users] [ProductName] not replaced in Shortcut Name
>
>
> Thanks for your answers.
> I tried a property too. It didn't work. It wasn't replaced. Maybe that's
> because the name field of a shortcut of the type Filename and not
> Formatted. Well i guess i'll have to use text without the ProductName.
>
> Andreas Hellwig
>
> Tony Juricic schrieb:
>   
>> I had similar things happen to me and solved them by using CA like:
>>
>>     <Property Id="PROGRESS_DLG_TITLE" Secure="yes" />
>>     <CustomAction Id="SetProgressTitle" Property="PROGRESS_DLG_TITLE"
>> Value="!(loc.ProgressDlg_Title)" Execute="immediate" />
>>
>> In this case above dialog title contained [ProductName] which was not
>> resolved. Then you schedule CA very early and insert the property name
>> where you need resolved string.
>>
>> The only way I can understand this is that MSI DB fields are not all
>> equal. For some resolution works, for others doesn't.
>>
>> -----Original Message-----
>> From: Andreas Hellwig [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 01, 2008 9:54 AM
>> To: General discussion for Windows Installer XML toolset.
>> Subject: Re: [WiX-users] [ProductName] not replaced in Shortcut Name
>>
>> Well I used [ProductName] like it is used in the WiXUI localization
>> files. Everywhere else it works correct. Just in the shortcut it isn't
>> replaced correctly.
>>
>> in the .wxl file i've got this:
>>   <String Id="Test_UninstallLinkTitle" Overridable="yes">Uninstall
>> [ProductName]</String>
>>   <String Id="Test_UninstallLinkDescription" Overridable="yes">Removes
>> [ProductName] from your computer.</String>
>>
>> and in my .wxs file i've got this:
>> <Shortcut Id="UninstallProduct_all"
>>   Name="!(loc.Test_UninstallLinkTitle) "
>>   Target="[System32Folder]msiexec.exe"
>>   Arguments="/x {$(var.TEST_PRODUCT_CODE)}"
>>   Directory="Test_startmenu_subfolder"
>>   Description="!(loc.Test_UninstallLinkDescription)" />
>>
>> any idea why the [ProductName] isn't replaced for the shortcut?
>>
>> Andreas Hellwig
>>
>>
>>
>> Rob Hamflett schrieb:
>>
>>     
>>> [ProductName] indicates that ProductName is a property.  Are you sure
>>>
>>>       
>> you don't want $(loc.ProductName)?
>>
>>     
>>> Rob
>>>
>>> Andreas Hellwig wrote:
>>>
>>>
>>>       
>>>> Hi,
>>>>
>>>> I'm trying to create a shortcut with a localized name, but sadly
>>>> '[ProductName]' isn't replaced in the localization-string (same for
>>>>
>>>>         
>> the
>>
>>     
>>>> description). Is there a method to get it working correctly?
>>>>
>>>> Andreas Hellwig
>>>>
>>>>
>>>>
>>>>         
>> ------------------------------------------------------------------------
>> -
>>
>>     
>>>> Check out the new SourceForge.net Marketplace.
>>>> It's the best place to buy or sell services for
>>>> just about anything Open Source.
>>>> http://sourceforge.net/services/buy/index.php
>>>>
>>>>
>>>>         
>>>       
>> ------------------------------------------------------------------------
>> -
>>
>>     
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>>>       
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>     
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>   


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to