0

I'm creating an installation with instalshield. In the "Installation Interview", (which is part of the "Project Assistant") I set the option "to prompt users to enter their Company Name".

My question is: how can I interact with the value they entered? I mean how can I get it? I need to take this value and insert it to my app config file , during the installation process.

In a more general way, I would love to know how can I add text fields of my own and interact with the values the customers insert?

Thank you, Noam

Noam
  • 1,640
  • 4
  • 26
  • 55
  • 1
    In your install you must have a property associated with the edit field you created for them to enter the company name. Whatever that property is just reference it with brackets, [YOURCOMPANYNAME] – Doc Nov 20 '17 at 12:40
  • @DavidDaugherty Can you be more specific? How exactly can I do that? all my action items are powershell scripts i.e. I need to reference it from Powershell, also, the edit field was created automatically by the wizard, and I dont see anything like "Organization name" in the property manager.. What am I missing? – Noam Nov 20 '17 at 13:49
  • 1
    You did not specify Powershell previously. I have written hundreds of MSI custom actions in the past but I have not written any using Powershell. A quick googling for 'windows installer powershell custom action getproperty' found this as the first link, https://www.advancedinstaller.com/user-guide/set-windows-installer-property-custom-action.html#powershell-ca. All edit fields have a property associated with them. Find that value in the InstallShield UI and you will know the name of the property. Properties are like variables in the MSI world. – Doc Nov 21 '17 at 04:36

2 Answers2

1

Look at the installation Wizard Noam. Anywhere you see an edit control, you will notice that it has a property associated with it. The property is a 'variable' that will have a value assigned to it. You can use the property to populate a registry, an XML file, etc. I would look through the help documentation for InstallShield relating to Properties. http://helpnet.flexerasoftware.com/isxhelp19/helplibrary/IHelpISXPropertiesUse.htm

The link above goes over the difference between Public and Private properties and how you can use them.

Daniel Lee
  • 674
  • 1
  • 9
  • 25
0

Ok, so I sort of solved it, I didn't use any built in dialog boxes, but simply created my own public property and dialog, then added an event to dialog and finally read the property value with powershell script, in more details (for future noobies) :

  1. Create new property in Property Manager (under "Behavior and Logic"), give it a name and default value.
  2. Create new dialog (under "User Interface").
  3. At the behavior section of your dialog go to "Next" control (for example).
  4. Add event (by pressing the tiny green plus sign at the line of the "Events")
  5. Choose "SetProperty"
  6. At the SetProperty line you can specify a condition, for example ApplicationUsers = "AllUsers"
  7. At the "Property" field enter the property name (from first instruction)
  8. At the "Value" field enter the value you wish for.
  9. For getting the property value from powershell, create powershell script with the following: $value = Get-Property -Name PROPERTY_NAME
  10. That's it.

This is not exactly what I asked for in the question but I believe this answer is more general and so also contains the answer to my original question.

Noam
  • 1,640
  • 4
  • 26
  • 55