InstallShield MSI安装中的变量ODBC DSN名称 [英] Variable ODBC DSN name in InstallShield MSI installation
问题描述
我正在为产品设计一个新的MSI安装,该产品允许安装多个实例.安装的许多组件由2个字符的代码标识.其中有一个ODBC数据源.数据源的名称包含此2个字符的代码,这是用户在安装过程中输入的内容.我注意到我不能在InstallShield项目中使用属性名称"[MyPropertyName]"作为ODBC DSN的名称.是否有任何干净的方法允许在运行时设置ODBC DSN名称?如果要为每个实例创建硬连接名称,则可以为每个硬连接实例名称(例如"Test"和"Production")创建一个单独的DSN,但是我们允许用户指定名称.难道我会因此而陷入更多的死胡同,还是有办法允许用户指定实例特定的属性值?
I'm designing a new MSI installation for a product that allows multiple instances to be installed. Many of the components of the installation are identified by a 2-character code. Among these is an ODBC data source. The name of the data source includes this 2-character code, which is something the user enters during installation. I notice that I cannot use a property name "[MyPropertyName]" as the Name of an ODBC DSN in an InstallShield project. Is there any clean way to allow the ODBC DSN name to be set at runtime? If I were creating hard-wired names for each of my instances, I could create a separate DSN for each hardwired instance name ("Test" and "Production" for example), but we allow the user to specify the name. Am I going to run into more dead-ends as a result of this or is there a way to allow user-specified instance-specific property values?
推荐答案
您可以a)跳过MSI中的ODBC表并改用Registry表,或者b)使用自定义操作在安装时动态地将自定义行注入到ODBC表.
You could either a) skip the ODBC tables in MSI and use the Registry table instead or b) use a custom action to dynamically inject custom rows at install time into the ODBC tables.
这篇关于InstallShield MSI安装中的变量ODBC DSN名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!