简体   繁体   中英

InstallShield: Get the organization name during installation

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM