InstallShield 2009:检测系统 CSV 分隔符并更新 INI 值

发布于 2024-09-12 10:58:50 字数 548 浏览 2 评论 0原文

好吧,您可能知道法语中的 CSV 分隔符不是 ,,而是 ;。我们需要将应用程序部署到法语和英语系统。

我想做的是,InstallShield 会检测系统 CSV 分隔符,然后将此值保存在随应用程序安装的 INI 中(我知道,INI 很久以前就被注册表过时了,但这是我们选择的设计) 。

使用InstallShield 2009 可以做到这一点吗?我在特殊属性值的帮助文件中找不到该值的任何内容...

编辑:由于可能不清楚,请考虑此 INI 结构:

[settings]
separator=,

我想要分隔符< /code> 值由 InstallShield 自己在安装时动态设置(基于系统设置)。我知道 InstallShield 中的一些“特殊值”,如 [INSTALLDIR],但我不确定系统 CSV 分隔符是否有一个(您知道 CSV 分隔符多年来一直是所有 Windows 版本中区域设置的一部分)。

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).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伴我老 2024-09-19 10:58:51

我不知道 或 ;作为 INI 规范的一部分。我的理解是:

[Section]

Key=Value

值内部的任何定界实际上与 INI 的说法没有任何关系。

从您的问题中不清楚您是否正在使用 InstallScript 项目或 Basic MSI 项目,因此很难说如何做您想做的事情。一般来说,无论如何你都应该能够找到一种方法来做到这一点。

编辑:根据 http://en.wikipedia.org/wiki/INI_file ;实际上是保留来指示注释的,所以我会确保如果您编写了一个像

[Section]

Key=Value;MoreValue

这样的 INI,那么读取Section/Key 的 INI 调用实际上会返回您期望它返回的内容。 InstallShield 可能能够写入它,但您可能无法读取它。不尝试就很难说。

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.

绮筵 2024-09-19 10:58:51

我最终阅读了注册表项

HKEY_CURRENT_USER\Control
小组\国际\列表

并将该值保存到我的 INI 文件中。

I ended up reading the registry key

HKEY_CURRENT_USER\Control
Panel\International\sList

and saving that value to my INI file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文