
Best Answer installer96 , 11 July 2017 - 16:53
Thanks.
This was the right syntax.
Project.ISWIProperties["ALLUSERS"];
I had just forgotten to open the project first.
Go to the full post
Best Answer installer96 , 11 July 2017 - 16:53
Thanks.
This was the right syntax.
Project.ISWIProperties["ALLUSERS"];
I had just forgotten to open the project first.
Go to the full postPosted 10 July 2017 - 22:33
I'm trying to use the automation interface to get or set a property by its name.
All the documentation and most of the examples online are in VB so I'm struggling with the syntax.
Attempting to do it like the documentation says results in errors.
Project.ISWIProperties.Item("ALLUSERS"); // Says definition for Item doesn't exist
Project.ISWIProperties("ALLUSERS"); // Says ISWIProperties can't be accessed like a method
I tried accessing it like this
Project.ISWIProperties["ALLUSERS"]
And like this
// Get an InstallShield property by name
private static ISWiProperty GetISProperty(ISWiProject Project, string propertyName)
{
return Project.ISWIProperties
.OfType<ISWiProperty>()
.First(x => x.Name.Equals(propertyName));
}
...both resulted in a run-time error. Help?
Posted 10 July 2017 - 23:47
This thread has an example but not how to reference the automation dll
https://community.fl...p?t-182873.html
Posted 11 July 2017 - 16:53 Best Answer
Thanks.
This was the right syntax.
Project.ISWIProperties["ALLUSERS"];
I had just forgotten to open the project first.