开发者

Set Installsheild project environment variables through Automation Interface

I'm working to simplify using an InstallShield template by setting components, parameters, and environment variables from an .ini file via the automation interface. I'm stumped as to the right way to set the environment varia开发者_运维技巧bles called out in the project.

Are environment variables part of the ISWiProperties collection, or is there some other interface to access them? I walked the ISWiProperties list, and none of it seemed relevant.


I've been doing alot of this lately ( basically writing my own custom DSL using XML and processing it with C# Linq-to-xml calling into ISAuto COM ) and I'm finding a great many places where the object model simply doesn't expose what you need. In those cases I save the project in binary format and use WiX DTF ( insert favorite MSI interop library for whatever language you are programming in ) to do raw MSI sql authoring similar to using the direct editor.

However for what you are talking about, according to the documentation, there is a AddEnvironmentVar method on the ISWiComponent object that returns a ISWiEnvironmentVar object.

From the help:

m_ISWiFeature.ISWiComponents("MyComponent").AddEnvironmentVar "MyEnvironment"

The ISWiEnvironmentVar class then has a number of attributes for the different settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜