vicky
Posts: 66
Joined: Thu Aug 21, 2008 10:52 am

How to create Property using Custom Action?

Hi!

I am using AI-6.4 and building an enterprise project. For custom actions, i am using VC++ 6.0 MFC DLL.
I would like to create some properties which will remain same(can be reset again) through out the MSI session i.e. after calling different custom action, it should not get deleted.
I want to do it using Custom Action. Is it possible? If yes, then how?
Plz provide me VC++ code to achieve this.

I've made Property "ZSHOW" (as a public prop) with default value of "Hide". I am setting this value in one of my UI_Custom_Actions, say "CA_1" and getting it in another UI_Custom_Action, say CA_2. But, haven't received the value set in CA_1. Actually, i am using "ZSHOW" to hide/show a check box of a dialog. Value of "ZSHOW" is being set according to conditions required to hide or show check box.

Thanks in anticipation.

Regards,
Vicky
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to create Property using Custom Action?

Hi Vicky,

Please note that Windows Installer DLL custom actions need to be written in a specific way. For more details and a sample project please see the Serial Number Validation DLL article in the User Guide. For reading and setting a property you can use the MsiGetProperty and MsiSetProperty functions.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vicky
Posts: 66
Joined: Thu Aug 21, 2008 10:52 am

Re: How to create Property using Custom Action?

Hi Cosmin!

Plz read my post again, I know that MSISetProperty will set value of property and if property is not there, then , it will create that property in Property table. I've used this in one of my UI Custom actions but I want to use this property's value to hide/show my dialog controls. When, i was unable to do it, i create a property in Install Parameters page and tried to use it to hide/show my dialog controls, but, it is still of no use.

Plz help me to sort out the problem.

Regards,
Vicky
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to create Property using Custom Action?

Hi Vicky,

I answered to your other post, please take a look:
http://www.advancedinstaller.com/forums ... f=2&t=8560

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

Return to “Common Problems”