Search code examples
powershellcmdadministration

Automated installation of any program's setup wizard using powershell/cmd


I've got a major issue automating the installation of a program w/o user interference. I have a setup wizard, but I can't wrap up my head about finding the parameters to input in cmd or powershell so it install the program silently, tried start-process -FilePath 'C:\Program Files (x86)\Notepad++\install.exe' -ArgumentList '/S' -wait it will only run the wizard. The question is - is there any way so I can put in the parameters to the wizard, or extract the parameters list from wizard file, so I can automate the installation of the program.


Solution

  • Yes there is a way. Few ways actually.

    • Use chocolatey: cinst notepadplusplus. People already maintain huge number of packages and this way you contribute to the community. By creating choco package you will actually get to know all the steps to automate any install.
    • To find out silent args use usff (Universal Silent Switch FInder): cinst usff.
    • To find wizard params (customizations) use for instance insted: cinst insted. Some choco packages allow you to customize this via parameters - for instance yed has parameter that allows you to create desktop shortcut.
    • You can examine source code of the package to see how it is installed in automated fashion if you don't want (or can't) use chocolatey.

    If you want old fashion just run:

     .\installer.exe /S