Prompt for Variable Value on Install

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
tld212s
Posts: 5
Last visit: Wed Jun 02, 2021 9:39 am

Prompt for Variable Value on Install

Post by tld212s »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 5.8.187
Operating system: Windows 10 Enterprise
PowerShell version(s): 5, 7.1

*** Please add details and screenshots as needed below. ***

Is there a way to have a MSI installer prompt for a variable's value and then use that variable in the application?
For example, we have an app that will send email alerts. It would be nice to have the installer prompt for the "to" address for the Send-MailMessage command to use.
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Prompt for Variable Value on Install

Post by Alexander Riedel »

You *could* do that in a custom action. But typically you would not.
I would ask that in the application itself on first startup.
The installer runs potentially as an admin, meaning as a different user than the one who will use the app.
Since you can have multiple users on a machine, such a value is typically stored per user.
I don't know of course if that applies to your situation, but that is what I would do.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.