Tutorial :InstallShield 2009: detect system CSV separator and update INI value



Question:

OK as you may know the CSV separator in French is not , it's ;. We need to deploy an application to both French and English systems.

What I would like to do is that InstallShield would detect the system CSV separator and then save this value in an INI installed with the application (I know, INIs are outdated by the registry a long time ago, but it's the design we opted for).

Is it possible to do that with InstallShield 2009? I can't find anything for this value in the help file for special property values...

EDIT: Since it might be unclear, take in consideration this INI structure:

[settings]  separator=,  

I want the separator value to be dynamically set at the time of installtion by InstallShield himself (based on the system settings). I know some "special values" in InstallShield like [INSTALLDIR] but I'm not sure theres one for the system CSV separator (you know the CSV separator is part of the locale settings in all Windows versions since many years).


Solution:1

I'm not aware of the , or the ; as being part of the INI spec. My understanding is it's:

[Section]

Key=Value

Any delimiting inside of value really doesn't have anything to do with INI's per say.

It's not clear from your question if you are using an InstallScript project or a Basic MSI project so it's hard to say how to do what you want to do. In general though you should be able to find a way to do it regardless.

Edit: According to http://en.wikipedia.org/wiki/INI_file the ; is actually reserved to indicate comments so I would make sure that if you wrote an INI like

[Section]

Key=Value;MoreValue

That an INI call to read Section/Key actually returns what you expect it to return. InstallShield may be able to write it might you might not be able to read it. Hard to say without giving it a try.


Solution:2

I ended up reading the registry key

HKEY_CURRENT_USER\Control Panel\International\sList

and saving that value to my INI file.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »