Can Properties be set? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Lutious
Posts: 3
Joined: Thu Oct 25, 2007 7:00 pm

Can Properties be set?

Please forgive this noobish question, but I'm curious if there is a way to set properties from a text file during the installation process.

So I'd like to setup a porperty using the install parameters interface.

Then populate that property from a settings file that the user manipulates before running the MSI.

I can then use that property to configure other parts of the install process.
Quadiago
Posts: 71
Joined: Thu May 31, 2007 9:07 am

Thats a weird idea, and don't take this as the final word, but the only way I'm aware of would be by means of a custom action. That said, it shouldn't be too difficult to make a custom action to do this. You can write a little parser that sets properties by reading the .txt file.
Lutious
Posts: 3
Joined: Thu Oct 25, 2007 7:00 pm

Yeah I was thinking about the custom action, however, none of them seem to do what I want....or more likly I don't fully understand what each of the custom actions do :)

So I guess the a refined question would be: Which custom action should be used to execute the app that parces the text file, and can the parced values actually be stored so they can be used later in the install?


Ideally I would like to have the property set by an utility.exe app that parses the settings file and populates the properties I created.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

There are two methods to do this:
1) you can create your own EXE that will parse the file and launch the MSI with parameters that set the properties you will use
2) you create a custom action that reads the file and sets the properties

There is a custom action on the forum which can be used as a starting point for the one you need, please take a look:
http://www.advancedinstaller.com/forums ... entextfile

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Lutious
Posts: 3
Joined: Thu Oct 25, 2007 7:00 pm

Thanks!

I can achieve what I need using VBScript, and that all seem to work.

Is there anyway I can use a exe, or DLL in place of the VBScript ?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is there anyway I can use a exe, or DLL in place of the VBScript ?
Besides the VBScript custom action you can also use a DLL custom action. You can see which types of custom actions can be used by Windows Installer here:
http://msdn2.microsoft.com/en-us/library/aa372048.aspx

Please note that in your case you cannot use an EXE custom action because it will run in a different process and it will not be able to modify properties.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”