Silent run installer (.exe) with parameters on Windows

前端 未结 2 1613
你的背包
你的背包 2020-11-28 16:45

I have a windows setup file (.exe), which is used to install a software. This is a third party executable. During installation, it expects certain values and has a UI. I wan

相关标签:
2条回答
  • 2020-11-28 16:47

    You can also try creating a shortcut to the exe and adding (one at a time) common help parameters in the shortcut target and see if one gives you a help dialog. Some common parameters are /? /help -help --help

    This also depends on the developer implementing a help parameter, but most installer builders default to implementing, so more often than not you will get something. Also, try an internet search for "SOFTWARE NAME silent install". Quiet often the developer has some documentation on their web site. But, if it's a really small developer or freeware or the like, you may not find much.

    0 讨论(0)
  • 2020-11-28 17:04

    Deployment: Note that it is not always possible to run a setup.exe silently with full control of parameters and with reliable silent running. It depends on how the installer was designed. In these cases I normally resort to repackaging - some more detail below on this.

    Some general tips for dealing with deployment:

    1. Software Library Tip: Maybe try to look up the software to see if others have dealt with it for silent installation and deployment: https://www.itninja.com/software

    2. Extract Files: Is this an embedded MSI (Windows Installer) file or a legacy style setup.exe? Maybe try to extract the files first: Programmatically extract contents of InstallShield setup.exe (Installshield setup.exe files). More elaborate details:

      • How to run an installation in /silent mode with adjusted settings (extraction of non-Installshield setup.exe files - for example Advanced Installer or WiX setup.exe files)
      • Extract MSI from EXE
    3. Setup.exe: Just adding for completeness. You can try setup.exe /? or setup.exe /help or similar at the command line to check for embedded help in the exe.


    MSI Transforms: If you discover and embedded MSI file in the setup.exe, then you can customize the installation parameters in a standardized way. details here: How to make better use of MSI files. Light weight customization is by command line, heavy weight customization via transforms.

    Legacy Setup.exe: Legacy setup.exe are often created with Inno Setup, NSIS, or a few other non-MSI setup authoring tools. Each with their own quirks for command line. Here is an old source for some samples: http://unattended.sourceforge.net/installers.php.

    Repackaging: Corporate users often repackage such legacy setup.exe files and turn them into MSI or App-V packages (or the brand new MSIX format). On the topic of repackaging and also a piece on PowerShell and the availability of Windows Installer PowerShell Modules: How can I use powershell to run through an installer?.


    Some Further Links:

    • How to create windows installer
    • System Administrator deployment tools, including repackaging tools
    0 讨论(0)
提交回复
热议问题