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 2021, 5.8.188
Operating system: Windows 10 20H2
PowerShell version(s): 5.1
*** Please add details and screenshots as needed below. ***
I have a PowerShell script that accepts parameters. I included it as a file in the "Files and Folders" section of the Installer. But, how do I generate an MSI that can accept arguments so I can pass the parameters? For example, if I have the parameter "[switch]$CreateFile" in my PowerShell script, can I simply run "msiexec.exe /i installer.msi -CreateFile"? How do I define what I need?
How do I create a MSI that can accept parameters?
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.
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.
- jasonrutherford
- Posts: 5
- Last visit: Tue Feb 14, 2023 7:50 pm
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: How do I create a MSI that can accept parameters?
That is not really how MSI files or installers work. An MSI file is for installing/uninstalling an application on a computer. It is not intended to pass parameters to that application.
Maybe you can elaborate a little bit more what you are trying to do.
Maybe you can elaborate a little bit more what you are trying to do.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- jasonrutherford
- Posts: 5
- Last visit: Tue Feb 14, 2023 7:50 pm
Re: How do I create a MSI that can accept parameters?
Thanks for the reply. I mean properties I suppose. Like, you can typically run a MSI with "/qn" for quiet, no UI. or ALLUSERS to install for all users. My example in the original post shows what I need to do.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: How do I create a MSI that can accept parameters?
The command line options for MsiExec are documented on the Microsoft web site:
https://docs.microsoft.com/en-us/window ... ds/msiexec
https://docs.microsoft.com/en-us/window ... ds/msiexec
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.