更新 INSTALLDIR 以进行多实例安装
我正在使用 InstallShield 2012 为 Windows 服务创建安装包。我希望用户能够在同一台计算机上安装我的服务的多个命名实例。 (如果您是 SQL Server 用户,我想要执行与命名实例相同的操作。)
我想要做的是让用户输入他们正在安装的实例的名称( INSTANCE_NAME) 并将其附加到 INSTALLDIR。我已经创建了一个屏幕来捕获 INSTANCE_NAME,但我不知道如何将其附加到 INSTALLDIR。我需要编写脚本还是可以使用“目录”表来完成?
例如 安装目录=> c:\Program Files\我的公司\我的产品\我的实例\
I'm creating an installation package for a Windows Service using InstallShield 2012. I want the user to be able to install multiple named instances of my service on the same machine. (If you're a SQL Server user, I want to do the same as it does with named instances.)
What I'd like to be able to do is get the user to enter the name of the instance they're installing (INSTANCE_NAME) and append it to INSTALLDIR. I've created a screen to capture the INSTANCE_NAME but I can't work out how to append it to the INSTALLDIR. Do I need to write a script or can I do it using the 'Directory' table?
e.g
INSTALLDIR => c:\Program Files\My Company\My Product\My Instance\
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完整的解决方案比我要说的更复杂,但基本上您可以使用 Type 35(设置目录)自定义操作来完成。
设置 INSTALLDIR = [ProgramFilesFolder]My Company\My Product[INSTANCENAMEPROPERTY]
然后,在继续下一个对话框(新对话框)之前,您可以使用对话框的“下一步”按钮上的控制事件来调用自定义操作
The complete solution is more complex then what I'm about to say but basically you can do it with a Type 35 ( Set Directory ) Custom Action.
Set INSTALLDIR = [ProgramFilesFolder]My Company\My Product[INSTANCENAMEPROPERTY]
You then use a Control Event on the Next Button of your dialog to call the custom action before proceding to the next dialog ( New Dialog )
在Installshield中,转至Release>Config。在每个实例的多个实例选项卡中设置 InstallDir、ProductCode 和 ProductName。
In Installshield, go to Release>Config. In the multiple instances tab for each instance set the InstallDir and ProductCode and ProductName.