nainrohan
Posts: 3
Joined: Tue Jan 21, 2025 10:55 am

Taking input via Powershell script file in custom action

Hello team, I am running a powershell script via "Run Powershell script file", if I run the script manually I have option to give inputs as I am using "Read-Host" but if I run it with the installer I am not being asked to provide with the input.
Is it not possible to take user input to the powershell's script by "Read-Host" and we have to use dialogues only?


Regards,
Rohan
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: Taking input via Powershell script file in custom action

Hello Rohan,

Indeed, using the dialog controls and then retrieving the value of the properties assigned to the controls is a viable solution.

Another thing I can think of is spawning a messagebox or simply some UI from your PowerShell script and then capture the result.

However, considering we are talking in an installation context, the first option seems more feasible to me.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”