Reputation: 3181
I am a complete Noob on Windows and, for the first time of my life, I have to make a Powershell script to install various services on a server. From what I understood, silent installations are made this way:
Start-Process "C:\Path\To\some_installer.exe" -ArgumentList "/some /argument" -Wait -PassThru
But I cant figure a way to identify what the arguments should be for this given .exe
. On Linux, I would launch the installer and answer to the prompts one by one to know what the arguments are supposed to be. Then:
(echo arg1; echo arg2) | my command
But since Start-Process
does not display a similar behavior (or I am not using it properly), I am lost. I tried the -RedirectStandardOutput
but getting nothing in the output file. How do you identify the argument list to provide?
Upvotes: 0
Views: 2260
Reputation: 172
Just like Linux, Windows has many package installation tools. The difference is that the Windows installers are mostly designed for GUI. So there is no standard for CLI. For each installation, you need to check for the installer.
If it's an MSI file, you can use the Microsoft docs. If it's an executable, you need to check for the installer. Many software use common installation wizards, but many of them use custom ones.
If you want to use it like Linux, you can use scoop or chocolatey. You can have a local repository in your network then share. Or just use internet. Then you can have silent installation by default.
Upvotes: 1