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!

mjs
Posts: 13
Joined: Mon Jul 23, 2007 5:00 pm

newbie questions about custom actions and setting properties

I am demo-ing advanced installer and I have a couple of newbie questions.

Is it possible to set a property or properties from a custom action that is a .exe or .dll?

I need a to make a browse for domain and a browse for domain user dialog. I need to call a custom action that will fill a list box with a list of domains on the network and another one that will users on the selected domain. What is the best way to accomplish this?

Also, I need to call a custom action (an .exe that will parse an .xml file) and have it set some property values. Is that possible?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is it possible to set a property or properties from a custom action that is a .exe or .dll?
Properties cannot be set from .exe custom action because they don't have access to the installer session, but they can be set from a .dll custom action using the MsiSetProperty function:
http://msdn2.microsoft.com/en-us/library/aa370391.aspx

For an example on how to create a .dll custom action please see:
http://www.advancedinstaller.com/user-g ... n-dll.html
I need a to make a browse for domain and a browse for domain user dialog. I need to call a custom action that will fill a list box with a list of domains on the network and another one that will users on the selected domain. What is the best way to accomplish this?
You can use a vbscript custom action which looks like this:

Code: Select all

Set db = Session.Database

For index = 0 to 2
    itemValue = "Test" & index
    itemText = itemValue
    SQLCmd = "INSERT INTO `ListBox` (`Property`,`Order`,`Value`,`Text`)"
    SQLCmd = SQLCmd & " VALUES ('NEWDIALOGLISTBOX_323_PROP','" &  index & "','"
    SQLCmd = SQLCmd & itemValue & "','" & itemText & "') TEMPORARY"     
    Set view = db.OpenView( SQLCmd )
    view.Execute
    view.Close
Next
Where:
- itemValue and itemText represent the value and the text of an object in the listbox;
- NEWDIALOGLISTBOX_323_PROP is the property of the listbox.

You can modify this script according to you project and use it for filling the listbox.

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

Return to “Common Problems”