Setting user-defined properties by external program? - Advanced Installer Community
Christian0815
Posts: 10
Joined: Fri Jul 16, 2010 12:42 pm

Setting user-defined properties by external program?

Hi there,

is it possible to let an external program (launched by the installation process) set user-defined properties which can be used in the installation dialogs then?
If so, how can this be achieved?
TIA!

cheers,
Chris
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting user-defined properties by external program?

Hello Chris,

Yes, this is possible by using a DLL or VBS custom action. For example, if you need to get or set a property value from a VB Script custom action, then you can use Session.Property property. Within a DLL you can use the MsiSetProperty and MsiGetProperty functions.

Also, here are a few links which contain example code for custom actions which set and get a property value:
- Developing a DLL for serial number validation
- Create fully fledged C# custom actions
- Remove a file or a folder during installation

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Christian0815
Posts: 10
Joined: Fri Jul 16, 2010 12:42 pm

Re: Setting user-defined properties by external program?

Hello Daniel,

thank you for your reply.
The MsiSetProperty and MsiGetProperty function are the key to the solution of my problem - thanks a lot! :)

regards,
Chris
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting user-defined properties by external program?

You're always welcome Chris.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”