Hi Diego,
For this you can create you own custom action that will get the system currency and
set the property attached to the combobox control. For details, please take a look on the
Working with Windows Installer ComboBox and ListBox controls article.
For example, you can create your custom action as a
custom action written in C# or a
custom action written in C++.
Then you can go in the
Custom Actions page and add a predefined
Call function from attached native DLL custom action with sequence. Using this type of custom action you can call a function from a native DLL. The target DLL will be embedded in the MSI file but will not be deployed at install time with the other application files.
You can also take a look on the
How to integrate and debug custom actions? article which may be useful to you.
Here's a piece of code that will implement your scenario:
Code: Select all
[CustomAction]
public static ActionResult curency(Session session)
{
string currencySimbol = Convert.ToString(System.Globalization.RegionInfo.CurrentRegion.CurrencySymbol);
string currencyName = Convert.ToString(System.Globalization.RegionInfo.CurrentRegion.CurrencyNativeName);
session["AI_COMBOBOX_DATA"] = "COMBOBOX_PROP|" + currencySimbol + "#" + currencyName;
session["COMBOBOX_PROP"] = currencyName;
return ActionResult.Success;
}
Let me know if you have any questions.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging