Windows installer silent install

/quiet, /q, qn Fully silent mode
/passive Unattended mode, shows progress bar only.
/norestart Do not restart the system after the installation
/forcerestart Restart the system after installation is complete
/log, /l Enable Logging

Example

Silently install the msi package:

msiexec /i C:\setup.msi /qn

Silently install the msi package, no reboot

msiexec /i C:\setup.msi /qn /norestart

Silently install the msi package and write the installation log to file C:\msilog.txt

msiexec /i C:\setup.msi /l*v C:\msilog.txt /qn

Silently uninstall the msi package:

msiexec /x C:\setup.msi /qn

Silently uninstall the msi package by the product code:

msiexec /x {XXXXXXXX-9215-4780-AAC6-01FD101DC931} /qn

If you are a System Administrator, IT Pro, or Developer, and want to find out how to perform a silent MSI or EXE installation – this article is for you!

In this article, we’re diving into silent installations and discussing the following topics:

  • What is a silent install?
  • Where and why do we need an application to be silently installed?
  • Application installer types: MSI vs EXE
  • How to create a silent unattended installation?

What is a silent installation?

A silent (or unattended) installation is the ability to install an application package, most frequently an MSI or an EXE, without any user interaction. This means that the user will no longer need to go through the install wizard (and click Next multiple times). The application will be installed automatically by calling the installer with specific silent install parameters.

Where and why do we need an application to be silently installed?

Silent installations are often the most useful within Enterprise environments.

Imagine a company with more than 1000 users and computers where you need to install an application on all machines but most of the users are not necessarily tech-savvy. It wouldn’t make sense to use a CD/USB stick and manually install the application by yourself because it will take ages.

We can assume that in Enterprise environments, some users would be able to install the app, but the majority may not have the technical knowledge or administrative privileges to install software by themselves.

This is why we will see Configuration Management tools like Microsoft SCCM (MECM), Intune, Ivanti Landesk, Empirium Matrix42 often being used in Enterprise Environments.

These configuration management tools help to automate the integration of application packages in the infrastructure with the corresponding install parameters and then deploy them to the user’s machine. This is done through silent installation.

The user will just have to make a request for a specific software (usually in the ticketing system or in the application catalog if implemented) and it will be automatically installed on their machine.

Application installer types: EXE vs MSI

There are two main Windows installer package formats: EXE and MSI. Depending on the format, the way to install the application silently will differ and in some cases, you will not be able to silently install an application at all.

Don’t worry, we will cover those particular cases here in this article and what must be done in that situation.

Besides MSI and EXE, the newest format that Microsoft released, is the MSIX which is automatically installed silently when it is integrated into deployment tools such as Configuration Manager or Endpoint Manager.

If you want to learn more about MSIX, read out our MSIX Tutorial.

How to silently install an MSI Package

MSI stands for Microsoft Installer and it’s the Windows standard installer format. It uses msiexec.exe to install the setup and accepts the standard MSI parameters.

MSI’s silent install standard command line parameters are as follows:

  • /quiet — quiet mode (there is no user interaction)
  • /passive — unattended mode (the installation shows only a progress bar)
  • /q — set the UI level:
  • n — no UI
  • n+ — no UI except for a modal dialog box displayed at the end.
  • b — basic UI
  • b+ — basic UI with a modal dialog box displayed at the end. The modal box is not displayed if the user cancels the installation. Use qb+! or qb!+ to hide the [ Cancel ] button.
  • b- — basic UI with no modal dialog boxes. Please note that /qb+- is not a supported UI level. Use qb-! or qb!- to hide the [ Cancel ] button.
  • r — reduced UI
  • f — full UI

A regular command line to silently install an MSI should look like this:

 Msiexec /i <applicationname.msi> /qb! /l*v install.log
Command line for MSI silent installation

The /l*v install parameter is used to create an installation log. Having an installation log is useful because when you run a silent installation, the GUI is hidden and the errors are not shown.

In addition to the silent installation parameters, an MSI accepts properties. So, for instance, you can tell your MSI application where the install location should be by typing the INSTALLDIR property from the following command line:

Msiexec /i <applicationname.msi> INSTALLDIR=C:\MYDIR /qb! /l*v install.log

You can find more information on all MSI install parameters in the Advanced Installer MSIEXEC command line user guide.

If you are a developer and want to create an MSI silent installation package, you can check out our step-by-step guide on How to Create a Silent Installation MSI package?

How to silently install an .EXE file?

When it comes to the .exe format type of installer, compared to the MSI, there is no standard process regarding silent install parameters. These parameters will vary depending on the software that was used to create the setup installer.

But, if there’s no standard process, how do we find the silent install parameters?

Here are a couple of methods worth trying:

1. Check if setup.exe has some install parameters by calling the setup.exe in a cmd and typing in the /? or /help. This will usually open a help/usage message box.

Setup.exe /? /help
//cmd photo of msg box

2. Access the vendor’s application support page or forum. There, you may find what install parameters the application supports and it might also give you full silent install instructions. That is if the vendor decided to create a support page.

3. If none of the above methods work, you could open the setup.exe by double-clicking on it until you see the installation wizard.

Usually, in the installation wizard, you can notice which tool/packaging program was used to package the installer. With this information, you can go to the official website of the tool and search for the default installation parameters.

Regardless of the default parameters, some developers might choose not to include any silent install parameters for their installer – but this is NOT a recommended practice.

Which are the most common application packaging tools and their silent install parameters for setup.exe?

Advanced Installer’s silent install parameters for setup.exe

Both these commands will display a help dialog containing the command-line options for the EXE setup.

Launches the EXE setup without UI.

Launches the EXE setup with basic UI. The UI level set using the above command-line options will overwrite the default UI level specified when the package was built.

Options for msiexec.exe on running the MSI package.

Command example:

Setup.exe /exenoui /qn /norestart 

The full list of the supported parameters can be found in the Advanced Installer User Guide.

Installshield’s silent install parameters for setup.exe

Launches the EXE setup in recording mode, which will generate a response file that later will be called to perform a silent installation.

Launches the EXE setup in silent mode and uses the response file mentioned previously. The response file must be present in the same folder with the setup.exe.

Launches the Exe setup in silent mode and uses the Basic MSI install parameters.

Command example:

Setup.exe /s /v"/qn INSTALLDIR=D:\Destination" 

WiX Toolset’s silent install parameters for setup.exe

Launches the help message box which displays the other supported install parameters.

/q ; /quiet ; /s ; /silent

Launches the EXE setup in silent mode.

Launches the Exe setup in silent mode with a progress bar only, displaying installation progress.

Creates an installation logfile.

Tells the setup.exe not to perform any required reboots.

Command example:

Setup.exe /q /log /norestart

Inno Setup’s silent install parameters for setup.exe

Launches the help message box which displays the other supported install parameters.

Launches the EXE setup in silent mode with a progress bar only, displaying installation progress.

Launches the EXE setup in silent mode with no display whatsoever.

Creates an installation log file in the user’s temp folder. For a custom log file location use:

Tells the setup.exe not to perform any required reboots.

Command example:

Setup.exe /VERYSILENT /LOG /NORESTART

NSIS’s silent install parameters for setup.exe

Launches the EXE setup in silent mode.

Sets the default installation directory. It must not contain any quotes. Only absolute paths.

Command example:

Setup.exe /S /D=c:\My custom installdir

Use Application Repackaging When You Have No Support for Silent Installation

You have tried all the above methods for the setup.exe and unfortunately, you came to the conclusion that it does not support silent installation.

If there is no MSI version of the application or the EXE setup does not support silent installation, use application repackaging.

Repackaging your application with Advanced Installer into an MSI or an EXE will fully support silent installation.

The Advanced Installer Repackager allows you to capture software installation and/or OS changes by performing a comparison between an initial and a final system snapshot. The result can then be built into a new installation package (32 or 64 bit), as an MSI, MSIX, or App-V installer.

Get a full walkthrough on the repackager in our comprehensive blog article The Repackager or the Modern Technique of Application Packaging.
Also, check out this demo video to learn how to use the Advanced Installer Repackager.

How to silently install Advanced Installer EXE setups?

To trigger a silent installation of a setup.exe with Advanced Installer, you need to use the /exenoui install parameter. Besides setting the install display level of the main setup, this parameter also controls the display level of the MSI or EXE packages included as prerequisites in a bootstrapper Advanced Installer project.

Let’s assume you have three MSI packages that you need to install silently from a setup.exe.

To do that, follow these steps:

  1. Navigate to the Prerequisites page from your Advanced Installer project.
  2. Add each package as a Feature-based prerequisite.
Add package as feature-based prerequisite

You NEED to set up the corresponding install command lines from the Setup Files tab for each application.

You can see in the below screenshot that for the Silent (no UI) we have the /qb! Silent install parameter specific for MSI applications.

Silent install parameter specific for MSI

As mentioned earlier, when the main setup.exe is executed with the /exenoui parameter, it will take into consideration the silent (no UI) parameters of each application you added.

In case you want to add setup exes instead of MSI, you have to check the application manufacturer of each specific application for the supported silent install parameters.

For more details, you can check out our comprehensive guide on how to create a suite installation and how to silently install the SQL Server Express 2019 Prerequisite into the main installation package.

Conclusion

Silent installations are a great way to install software. This type of installation is especially useful for businesses that want to deploy their software on multiple computers without the need for user input or interaction.

Silent installations are automated and less time-consuming as they allow you to deploy your software more efficiently.

Let us know if you found this article useful and leave questions for us!

Get Advanced Installer 30-day full-featured Trial for your silent installations — Repackager included!

Subscribe to Our Newsletter

Sign up for free and be the first to receive the latest news, videos, exclusive How-Tos, and guides from Advanced Installer.

Popular Articles

The Windows Installer technology uses Msiexec.exe for installing MSI and MSP packages. This tool gives you full control over the installation process, allowing you to set:

  • install options (install, uninstall, administrative install, advertise a product)
  • display options (full, basic or no UI during the installation)
  • restart options (if the machine will be restarted after the installation)
  • logging options
  • update options (apply or remove updates)
  • repair options (only for an installed package)
  • public properties which are used by the installation

The usual form of the msiexec command line is this:

msiexec.exe <install_option> <path_to_package> [package_parameters]
Install Options

When launching an installation package, you can set the install type through these options:

msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] <path_to_package>
  • /i – normal installation
  • /a – administrative install
  • /j – advertise the product
    • u – advertise to the current user
    • m – advertise to all users
    • /g – the language identifier used by the advertised package
    • /t – apply transform to advertise package
  • /x – uninstall the package

Sample command line:

msiexec.exe /i "C:Example.msi"
Display Options

The user interface level of the installation can be configured according to the target environment. For example, a package distributed to clients should have a full UI, while a package deployed through Group Policy should have no user interface. Msiexec.exe sets the UI level of the installation through these options:

msiexec.exe /i <path_to_package> [/quiet][/passive][/q{n|b|r|f}]
  • /quiet – quiet mode (there is no user interaction)
  • /passive – unattended mode (the installation shown only a progress bar)
  • /q – set the UI level:
    • n – no UI
    • b – basic UI
    • r – reduced UI
    • f – full UI

Sample command line:

msiexec.exe /i "C:Example.msi" /qn
Restart Options

Sometimes an installation overwrites files which are in use or it needs to reboot the machine in order to finish. The reboot policy used by the installation can be set through these options:

msiexec.exe /i <path_to_package> [/norestart][/promptrestart][/forcerestart]
  • /norestart – the machine will not be restarted after the installation is complete
  • /promptrestart – the user will be prompted if a reboot is required
  • /forcerestart – the machine will be restarted after the installation is complete

Sample command line:

msiexec.exe /i "C:Example.msi" /norestart
Logging Options

When debugging an installation package you can use multiple logging parameters in order to create a log. This log will contain different information for each parameter you use:

msiexec.exe [/i][/x] <path_to_package> [/L{i|w|e|a|r|u|c|m|o|p|v|x+|!|*}][/log] <path_to_log>
  • /L – enable logging
    • i – include status messages
    • w – include non-fatal warnings
    • e – include all error messages
    • a – mention when an action is started
    • r – include action-specific records
    • u – include user requests
    • c – include the initial UI parameters
    • m – include out-of-memory or fatal exit information
    • o – include out-of-disk-space messages
    • p – include terminal properties
    • v – verbose output
    • x – include extra debugging information
    • + – append to an existing log file
    • ! – flush each line to the log
    • * – log all information, except for v and x options
  • /log – the equivalent of /l*

Sample command line:

msiexec.exe /i "C:Example.msi" /L*V "C:package.log"
Update Options

The Windows Installer command line can apply or remove updates (patches for example) through these options:

msiexec.exe [/update][/uninstall[/package<product_code_of_package>]] <path_to_package>
  • /update – apply updates (if there are multiple updates, you can separate them through the “;” character)
  • /uninstall – remove an update for a product (if there are multiple updates, you can separate them through the “;” character)
    • /package – specifies the package for which the update is removed

Sample command lines:

msiexec.exe /update "C:MyPatch.msp"
msiexec.exe /uninstall {1BCBF52C-CD1B-454D-AEF7-852F73967318} /package {AAD3D77A-7476-469F-ADF4-04424124E91D}

TipIn the above command line the first GUID is the Patch identifier GUID and the second one is the Product Code of the MSI for which the patch was applied.

Repair Options

If you have an installed package, you can use the Windows Installer command line for repairing it:

msiexec.exe [/f{p|o|e|d|c|a|u|m|s|v}] <product_code>
  • /f – repair a package
    • p – repair only if a file is missing
    • o – repair if a file is missing or an older version is installed
    • e – repair if file is missing or an equal or older version is installed
    • d – repair if a file is missing or a different version is installed
    • c – repair if a file is missing or the checksum does not match the calculated value
    • a – forces all files to be reinstalled
    • u – repair all the required user-specific registry entries
    • m – repair all the required computer-specific registry entries
    • s – repair all existing shortcuts
    • v – run from source and recache the local package

Sample command line:

msiexec.exe /fa {AAD3D77A-7476-469F-ADF4-04424124E91D}

In the above command line the GUID is the Product Code of the MSI which will be repaired.

Set public properties

The name of a public property contains only uppercase letters (for example PROPERTY). This type of properties can be set through the command line like this: PROPERTY=”value”.
Sample command line:

msiexec.exe /i "C:Example.msi" MY_PROP="myValue"
  • MSIEXEC.EXE – the MSI executable, the program that performs the actual installation of the application.
  • /I – this switch informs the Windows Installer to install the specified application (as opposed to removing, reinstalling or repairing the application)
  • /QB-  – this switch instructs the Windows Installer to perform the installation with a basic user interface requiring no dialog boxes to be displayed. You might also use /QN to perform the installation with no user interface at all.
  • Correct syntax:
    msiexec /i A:Example.msi PROPERTY=VALUE
    Incorrect syntax:
    msiexec /i PROPERTY=VALUE A:Example.msi
    Property values that are literal strings must be enclosed in quotation marks. Include any white spaces in the string between the marks.
    msiexec /i A:Example.msi PROPERTY=”Embedded White Space”
    To clear a public property by using the command line, set its value to an empty string.
    msiexec /i A:Example.msi PROPERTY=””
    For sections of text set apart by literal quotation marks, enclose the section with a second pair of quotation marks.
    msiexec /i A:Example.msi PROPERTY=”Embedded “”Quotes”” White Space”
    The following example shows a complicated command line.
    msiexec /i testdb.msi INSTALLLEVEL=3 /l* msi.log COMPANYNAME=”Acme “”Widgets”” and “”Gizmos.”””
    The following example shows advertisement options. Note that switches are not case-sensitive.
    msiexec /JM msisample.msi /T transform.mst /LIME logfile.txt
    The following example shows you how to install a new instance of a product to be advertised. This product is authored to support multiple instance transforms.
    msiexec /JM msisample.msi /T :instance1.mst;customization.mst /c /LIME logfile.txt
    The following example shows how to patch an instance of a product that is installed using multiple instance transforms.
    msiexec /p msipatch.msp;msipatch2.msp /n {00000001-0002-0000-0000-624474736554} /qb
    When you apply patches to a specific product, the /i and /p options cannot be specified together in a command line. In this case, you can apply patches to a product as follows.
    msiexec /i A:Example.msi PATCH=msipatch.msp;msipatch2.msp /qb
    Some Sample Commands for EXE files:–

  • setup.exe /q
  • setup.exe /qn
  • setup.exe /silent
  • setup.exe /s
  • setup.exe /NoUserInput
  • setup.exe /unattended
  • setup.exe /CreateAnswerFile
  • setup.exe /quiet

    Symantec

  • MsiExec.exe /norestart /q/x{BA4B71D1-898E-4306-AE87-8BA7A596F0ED} REMOVE=ALL

    psexec computer_name MsiExec.exe /norestart /q/x{BA4B71D1-898E-4306-AE87-8BA7A596F0ED} REMOVE=ALL
    cmd=’msiexec /qn /i %SOFTWARE%adobereader93AdbeRdr930_en_US.msi TRANSFORMS=%SOFTWARE%adobereader93AdbeRdr930_en_US.mst’
    ‘msiexec /qn /update %SOFTWARE%AdobeReader93AdbeRdrUpd932_all_incr.msp’
    ‘MsiExec.exe /x{AC76BA86-7AD7-1033-7B44-A80000000002} /qn ‘
    msiexec /qn /x{AC76BA86-7AD7-1033-7B44-A93000000001}
    msiexec.exe /qn /update “%SOFTWARE%AdobeReader93AdbeRdrUpd932_all_incr.msp”‘
    ‘msiexec /qb /uninstall “%SOFTWARE%adobe-readerAcroRead.msi’
    siexec /i “UNCPathfilename.msi” /qn

    With the Product key

    msiexec /i “UNCPathfilename.msi” /qn PIDKEY=”Key value without dashes

    Java

    jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s ADDLOCAL=jrecore,extra MOZILLA=1
    jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s /v”/qn ADDLOCAL=ALL IEXPLORER=1 INSTALLDIR=D:javajre”
    start /w jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s ADDLOCAL=jrecore,extra MOZILLA=1
    msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0n1n2n3n4n50}
    msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}
    msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0151020}
    Creating a Log File
    If you want to create a log file describing the installation/uninstallation, append /L C:<path>setup.log to the install/uninstall command. The following is an example for installation:
    Installation Example
    jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s /L C:<path>setup.log
    The following is an example for uninstalling:
    Uninstalling Example
    msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000} /L C:<path>setup.log

    Note:- Adobe Customization Wizard 9 will help you to create MST file for silent installation

    WINZIP:-

    Below is available WINZIP MSI File https://download.winzip.com/ov/winzip100.msi
    ymsgrie.exe /s /v/passive – install Yahoo! Messenger silent, with progress bar

    Team Viewer :–

    The /S switch for silent install of TEAMVIEWER WORKS!
    but you must do the following :
    download the program (preferably the latest version) ..or ..if you have it on your hard drive , open it… (AND LET IT OPEN! DO NOT CLOSE OR INSTALL THE APLICATION. JUST DUBLE-CLICK IT!!)
    Then , go to C:Documents and SettingsAdministratorLocal SettingsTemp. There you’ll see a folder called TeamViewer. Open that folder. Inside you’ll have 2 files. Teamviewer.exe and tvinfo.ini
    Copy the Teamviewer from that folder and paste wherever you want. After this you can close the other application.
    With the new teamviewer.exew which you copyed from the temp folder , u can run it sillently. Use the /S Switch. Works with WPI also.
      If you find MSiexec has problem then you can run below two commands
    msiexec /unregister  —> for unregistering the windows installer
      msiexec /regserver—> for registering the windows installer
    Released Versions of Windows Installer
    The table in this topic identifies the released versions of the Windows Installer.
    Release
    Version
    Description
    Windows Installer 2.0
    2.0.2600.0
    Released with Windows XP.
    Windows Installer 2.0
    2.0.2600.1
    Released with Windows 2000 Server with Service Pack 3 (SP3).
    Windows Installer 2.0
    2.0.2600.1183
    Released with Windows 2000 Server with Service Pack 4 (SP4).
    Windows Installer 2.0
    2.0.2600.2
    Released as a redistributable.
    Windows Installer 2.0
    2.0.2600.1106
    Released with Windows XP with Service Pack 1 (SP1).
    Windows Installer 2.0
    2.0.3790.0
    Released with Windows Server 2003.
    Windows Installer 3.0
    3.0.3790.2180
    Released with Windows XP with Service Pack 2 (SP2). Released as a redistributable.
    Windows Installer 3.1
    3.1.4000.1823
    Released as a redistributable. This version is has the same functionality as version 3.1.4000.2435.
    Windows Installer 3.1
    3.1.4000.1830
    Released with Windows Server 2003 with Service Pack 1 (SP1) and Windows XP Professional x64 Edition. Update this version to version 3.1.4000.2435 to address the issue discussed in KB898628.
    Windows Installer 3.1
    3.1.4000.3959
    Released with Windows Server 2003 with Service Pack 2 (SP2).
    Windows Installer 3.1
    3.1.4000.2435
    Released with a fix to address the issue discussed in KB898628. This is the latest version of Windows Installer 3.1.
    Windows Installer 3.1
    3.1.4001.5512
    Released with Windows XP with Service Pack 3 (SP3).
    Windows Installer 4.0
    4.0.6000.16386
    Released with Windows Vista.
    Windows Installer 4.0
    4.0.6001.18000
    Released with Windows Vista with Service Pack 1 (SP1) and Windows Server 2008.
    Windows Installer 4.5
    4.5.6002.18005
    Released with Windows Vista with Service Pack 2 (SP2) and Windows Server 2008 with Service Pack (SP2.)
    Windows Installer 4.5
    4.5.6000.20817
    Released as a redistributable for Windows Vista.
    Windows Installer 4.5
    4.5.6001.22162
    Released as a redistributable for Windows Server 2008 and Windows Vista with SP1.
    Windows Installer 4.5
    4.5.6001.22159
    Released as a redistributable for Windows XP with Service Pack 2 (SP2) and later, and Windows Server 2003 with SP1 and later.
    Windows Installer 5.0 is released with Windows Server 2008 R2 and Windows 7.
      To create exe file by using winrar for silent installation / Self Extractor
      create SFX archive”. Change the archive name if you like but it must have the .exe extension.

    Switch to the Advanced tab and select “SFX options” to open Advanced SFX options window.

    On the General tab in the “Path to extract” box type the path you want to extract the installer to. Make sure it is the same path you have in the antivir.cmd file. Then in the “Run after extraction” box type in the path to the antivir.cmd file.

    Change to the Modes tab and select the “hide all” and “overwrite existing files” radio buttons.

    Close the “Advanced SFX Options” window by clicking OK, then click OK on the “Archive name and parameters” window to start creating the installer. The finished installer is created in the antivirpec folder.
      Also you can do with 7zip  where you will have more options compare to winrar or winzipself extractor.

    Office 2007 silent install with SCCM 2007

    So here is his tip on how to create a customized MSP file with OCT:

    1. Go to the original package source that contains the Office 2007 setup files
    2. From the directory that contains the Office 2007 setup files, run setup.exe /admin. This should open the Office Customization Toolkit (OCT)
    3. Select to Create a new Setup customization file
    4. In the “Install location and organization name”, set the default installation location and organization name.
    5. Click on Licensing and user interface. Make sure you enter a valid product key, check the EULA checkbox and set Display level to None. Completion notice checkbox should not be checked and Suppress modal should be checked.
    6. Save the MSP file by going to File –> Save. Give the file a name and save it to the Updates folder located in the Office 2007 installation source folder. By saving it to the Updates folder, the /adminfile switch will not need to be used as part of setup.exe. If the file is not saved to the Updates folder, make sure that the /adminfile switch is used as part of setup.exe and that it points to the MSP file just created.

    Further more, with OCT you can customize almost everything regarding how your Word/Excel etc. applications will run. What I liked most is the possibility to create the default profile in Outlook if you are using an Exchange server in your organization.
    Don’t forget to save the MSP file and to put the file in Updates folder or to use /adminfile <path to MST file> switch .
      Hope I will try to post when i get some time

    Тихая установка — это такой процес, при котором вы тихо-мирно сидите и смотрите на экран, где без вашего участия происходит процесс установки ПО, при условии, что его вообще видно. При этом установщик не беспокоит вас вопросами типа Вы согласны с лицензионным соглашением?. Параметры для установки используются по-умолчанию. т.е. те, которые предлагает установщик при установке ПО обычным способом.

    К минусам тихой установки можно отнести всякие панели в обозревателях и ярыки типа E-Bay на рабочем столе, поскольку чаще всего подобные бонусы включены в установку по-умолчанию. Но это скорее исключение, хотя и не редкое. Подробно о тихой установке читайте в этой статье. 

    На самом деле тихая установка — это очень удобная процедура, которая экономит время и упрощает жизнь системного администратора. Я, например, использую режим silent install после чистой установки ОС.

    Режим тихой установки включается при помощи параметров или (как их ещё называют) ключей. Если вы не знаете, что это такое, можете восполнить пробел в знаниях при помощи этой статьи: BAT файлы. Запуск процедуры можно осуществить несколькими способами:

    1. Из командной строки, используя параметры.
    2. Аналогично через bat-файл (com-файл).
    3. Через SFX-архив с файлом конфигурации.

    Ключей достаточно много. Какой именно ключ нужно использовать зависит от установщика. Т.е. любая программа, говоря простым языком, это папка с файлами, а запаковывает всё это добро в один файл установки специальный сборщик (система создания установщиков ПО). И вот от того, какой сборщик использовался, зависит — какой ключ будет вызывать режим тихой установки. Наиболее известные системы создания установщиков:

    1. Install Shield
    2. WISE Installer
    3. NSIS
    4. Inno Setup

    Подробнее о ССИ и их ключах можно посмотреть тут. Также можно попробовать найти нужный ключ с помощью специального ПО — Universal Silent Switch Finder или почитать документацию на сайте разработчиков той программы, ключи к которой вы ищите.

    Во время экспериментов с тихой установкой мне встречались следующие параметры запуска режима тихой установки:

     /silent
     /verysilent
     /quiet
     /qb
     /qn
     /qr
     /passive
     /s
     /S
     /qn REBOOT=ReallySuppress
     /s /v" /qn REBOOT=ReallySuppress
    

    Ключи для отмены перезагрузки:

     /norestart
     /noreboot
    

    Антивирус Avast имеет опцию тихой установки в корпоративной версии. В бесплатной (Home) версии по заявлениям разработчиков тихой установки нет. Однако, если вы в курсе как работает инсталятор InstallShield, вы поймете, что это утверждение не соответствует действительности, поскольку этот инсталятор сам по себе поддерживает ключ тихой установки /S. А значит все продукты, выполненные на его базе — тоже. И Avast Home не исключение.

    Для запуска тихой установки архиватора 7Zip (сборщик NSIS) нужно запустить установщик с ключом /S. Положите установщик 7Zip (7z.exe) в корень диска С. Затем откройте меню Пуск › Выполнить (или   + R) и введите в форму следующую команду:

    C:7z.exe /S

    Архиватор установится без диалоговых окон и признаков внешней активности.

    Однако случается что установщик собран нестандартно и ключей для запуска тихой установки у него просто нет. К таким исключениям относится Avira Antivir. По-тихому можно только распаковать содержимое установщика во временную директорию (минус одно окно), а дальше всё. В этом случае приходится создавать специальные самораспаковывающиеся архивы с файлами инструкций внутри. Тут дело обстоит немного сложнее.

    Тихая установка с помощью sfx-архивов

    Выше я упомянул о случаях, когда вариант с ключами может не работать. Режим тихой установки может быть просто не предусмотрен разработчиком. В этом случае достаточно часто можно выйти из положения, используя sfx-архивы. Sfx-архив – это само-распаковывающийся архив.

    Одно из его достоинств в том, что для его распаковки не нужен архиватор. К тому же с помощью него можно существенно расширить возможности тихой установки, да и возможности установки ПО вообще.

    Например, сразу после распаковки sfx-архив позволяет запустить один или несколько распакованных файлов, удалить файлы после выполнения операций и много чего ещё. В этих операциях принимают участие конфигурационные файлы, содержащие команды (например, BAT файлы).

    При помощи команд можно имитировать процесс тихой установки. Многие установщики, в том числе и упомянутый в прошлой статье Avira, могут работать с файлами инструкций (подхватывать их), при условии, что инструкция находится в том же каталоге, что и установщик. Подробнее об инструкциях (командах, указывающихся в конфигах) можно узнать на сайте разработчика программы или на соответствующих форумах.

    Чтобы в общих чертах представить конфигурационный файл (для тех, кто не в курсе) ниже приведён пример такого файла для программы Firefox Portable

    [FirefoxPortable]
    FirefoxDirectory=Appfirefox
    ProfileDirectory=Dataprofile
    SettingsDirectory=Datasettings
    PluginsDirectory=Dataplugins
    FirefoxExecutable=firefox.exe
    AdditionalParameters=
    LocalHomepage=index.html
    DisableSplashScreen=false
    AllowMultipleInstances=false
    DisableIntelligentStart=false
    SkipCompregFix=false
    RunLocally=false

    Стоит отметить, что возможности и режимы работы программ со временем могут меняться. Firefox Portable может перестать поддерживать ini-файлы, а будущие версии инсталятора Avira – понимать и подхватывать файлы инструкций. Поэтому при экспериментах стоит ознакомиться с актуальной информацией о возможностях программ, которые вы планируете использовать.

    Как sfx-архив может помочь процессу тихой установки, я думаю, мы разобрались. Теперь настало время перейти к практической части. Для создания sfx-архивов я пользуюсь доработанным модулем архиватора 7Zip. Весь процесс создания sfx-архива и запуска при помощи него режима тихой установки описан в статье Олега Щербакова (разработчика модуля). Я же очень кратко перескажу написанное в ней, пояснив пару моментов.

    Сразу отмечу, что цель примера — запаковать установщик программы в sfx-архив таким образом, чтобы он после распаковки автоматически начинал устанавливаться по-тихому. В данной статье в качестве подопытного будет выступать установщик архиватора 7Zip (7z465.exe), хотя можно использовать любой другой, главное знать ключ тихой установки. У установщика 7Zip это ключ /S. Итак, для исполнения задуманного нам понадобится:

    1. Модуль sfх Олега Щербакова.
    2. Архиватор 7Zip. Им мы будем запаковывать установщик программы в архив формата «.7z». Архиватор, понятное дело, надо установить в систему.
    3. Установщик программы (как я отметил выше, в примере я использую 7z465.exe).
    4. Архив .7z, который мы получим, запаковав установщик программы архиватором 7Zip.
    5. Конфигурационный файл config.txt, в котором будут содержаться иструкции «поведения» sfx-архива при распаковке, т.е. в данном примере в нём будет содержаться команда на запуск тихой установки.
      Заклинание для создания sfx-архива (вводится в консоли).

    Для удобства я положил все ингредиенты в один архив, который вы можете скачать по этой ссылке. Также, если скачать вот эту программу, можно поменять иконку архива (как это сделать читайте тут).

    Обратите внимание, кодировка файла конфигурации config.txt должна быть UTF-8.

    Итак, получаем после скачивания и распаковки папку со всем этим добром, далее по списку:

    1. Устанавливаем архиватор 7zip (лежит в папке).
    2. Запаковываем подопытного 7z465.exe (лежит в папке) в 7z-архив. Получаем на выходе файл 7z465.7z.
    3. Открываем консоль (Пуск › Выполнить — cmd) и переходим в папку с файлами: cd C:files (пример для папки «files» на диске «С»).
    4. Запускаем в консоли заклинание:
      • COPY /b 7zsd.sfx + config.txt + 7z465.7z 7Zip.exe
      • 7zsd.sfx — имя модуля sfx.
      • config.txt — имя файла конфигурации.
      • 7z465.7z — имя запакованного установщика 7z465.exe.
      • 7Zip.exe — имя sfx-архива на выходе.

    В результате получаем sfx-архив 7Zip.exe, который представляет собой исполняемый файл или самораспаковывающийся архив, внутри которого содержится инструкция config.txt. Содержание инструкции следующее:

    ;!@Install@!UTF-8!
    RunProgram="7z465.exe /S"
    GUIMode="2"
    ;!@InstallEnd@!
    • ;!@Install@!UTF-8!
      ;!@InstallEnd@! – строки начала и конца файла инструкции. Это комментарии, их можно удалить. А вот остальные две нужны обязательно.
    • GUIMode=»2″ – режим распаковки архива без оповещений (по-тихому).
    • RunProgram=»7z465.exe /S» – строка инструкции, в которую необходимо вносить изменения в зависимости от того, какой установщик вы используете. В строке прописывается имя установщика, который запаковывается в 7z-архив и который требуется установить по-тихому + ключ тихой установки.

    На этом всё. Ознакомившись со статьями Олега (ссылки выше), можно создать различные архивы, выполняющие абсолютно разные задачи. Удачных экспериментов!

    To perform a silent installation of an MSI package using PowerShell, you can utilize the `msiexec` command with the appropriate flags to suppress user prompts.

    msiexec /i "C:\Path\To\YourInstaller.msi" /quiet /norestart
    

    Understanding MSI Files

    What are MSI Files?

    MSI files, or Microsoft Installer files, are a standard format for installing software on Windows operating systems. They contain all the necessary information and resources needed to install an application, including components, registry entries, and installation settings. Unlike other installation formats, such as EXE files, MSI files are specifically designed to work with Windows Installer, making them more suitable for enterprise deployment scenarios.

    Why Use Silent Installation?

    Silent installation refers to the process of installing software without any user interaction or graphical user interface (GUI). The benefits of this method are substantial, especially in enterprise environments where deploying software to multiple machines quickly and seamlessly is crucial.

    • Automation: Silent installs can be scripted and run automatically, reducing the need for manual input.
    • User Experience: Users can continue working without interruption, as they are not faced with installation dialogs.
    • Efficiency: System administrators can deploy applications across multiple machines simultaneously.

    Brew Install PowerShell: A Quick Start Guide

    Brew Install PowerShell: A Quick Start Guide

    PowerShell and MSI Installation

    Introduction to PowerShell

    PowerShell is a powerful scripting language developed by Microsoft, primarily used for task automation and configuration management. With its robust command-line scripting capabilities, PowerShell provides an efficient way to manage Windows-based systems and automate repetitive administrative tasks. Its compatibility with various Windows components, including MSI installers, makes it an invaluable tool for software deployment.

    How to Install MSI Files Using PowerShell

    Basic Command Structure

    To perform a silent install of an MSI file using PowerShell, you will commonly use the `msiexec.exe` utility. The command structure for installing an MSI silently is straightforward. Here’s a basic example:

    msiexec.exe /i "C:\Path\To\YourInstaller.msi" /qn
    

    In this command:

    • /i signals the installer to install the MSI file specified.
    • /qn denotes a «quiet» installation with no user interface.

    Breakdown of Command Parameters

    Understanding the command parameters is vital for successful installation. The /i parameter is utilized to initiate the installation process, while /qn is crucial for ensuring the process runs without any GUI prompts. This can greatly streamline the installation experience, particularly in environments requiring zero-touch deployments.

    You can also explore additional options like /qb (basic user interface) or /l*v (to enable logging with verbose output) for more control over the installation process.

    Mastering Credentials in PowerShell: A Quick Guide

    Mastering Credentials in PowerShell: A Quick Guide

    Performing Silent Installation via PowerShell

    Setting Up Your Environment

    To execute silent installations effectively, it’s essential to prepare your PowerShell environment. Ensure that Windows PowerShell is installed and updated to the latest version. Additionally, be mindful of the execution policy. For tasks involving scripts, it is recommended to set this Policy to allow running scripts by implementing the following command:

    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
    

    Executing a Silent MSI Install

    Example: Silent Installation Command

    Now that your environment is ready, you can proceed with executing the silent install. Here’s a complete example script that both installs the MSI and waits for the process to complete:

    $msiPath = "C:\Path\To\YourInstaller.msi"
    Start-Process msiexec.exe -ArgumentList "/i `"$msiPath`" /qn" -Wait
    

    This script sets the path to your MSI file and uses `Start-Process` to initiate the installation silently. The `-Wait` parameter ensures that PowerShell waits for the installation process to complete before continuing.

    Verifying Installation

    After the installation has concluded, it’s important to verify whether it was successful. You can do this by querying the installed software list. Here’s an example command to check if the software installed successfully:

    Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "YourSoftwareName*" }
    

    This command retrieves installed software and filters the results based on the product name you specify.

    Mastering Selenium PowerShell: Quick Guide and Tips

    Mastering Selenium PowerShell: Quick Guide and Tips

    Advanced Silent Installation Techniques

    Installing Multiple MSI Packages

    In many cases, you might need to install several MSI packages at once. The following example demonstrates how to iterate through multiple MSI files and install them silently:

    $msiList = @("C:\Path\To\First.msi", "C:\Path\To\Second.msi")
    foreach ($msi in $msiList) {
        Start-Process msiexec.exe -ArgumentList "/i `"$msi`" /qn" -Wait
    }
    

    This script creates an array of MSI file paths and executes a silent install for each one in the array.

    Error Handling in Silent Installations

    Common Installation Errors

    Even with careful planning, errors can occur during the installation process. Common MSI-related errors may include:

    • Access Denied: Occurs when proper permissions are not set.
    • File not found: When the specified MSI path is incorrect or the file is missing.

    Example of Adding Error Handling

    To enhance the installation script with error handling, you can add checks to examine the exit code after running the installation. Here’s how to add error handling to your script:

    $process = Start-Process msiexec.exe -ArgumentList "/i `"$msiPath`" /qn" -Wait -PassThru
    if ($process.ExitCode -ne 0) {
        Write-Host "Installation failed with exit code: $($process.ExitCode)"
    } else {
        Write-Host "Installation succeeded!"
    }
    

    This script captures the exit code of the `msiexec` process and provides feedback based on whether the installation was successful or not.

    Uninstall PowerShell Module: A Simple Step-by-Step Guide

    Uninstall PowerShell Module: A Simple Step-by-Step Guide

    Conclusion

    In this guide, we explored the use of PowerShell for performing silent installations of MSI files. By mastering these techniques, you will enhance your software deployment strategies and streamline the installation process within your organization. Embracing PowerShell commands enables system administrators to work efficiently in managing their software landscape, making it an indispensable skill in today’s IT environment.

    LastLogonTimestamp PowerShell Explained Simply

    LastLogonTimestamp PowerShell Explained Simply

    Additional Resources

    For further learning, consider exploring the following resources:

    • Official Microsoft documentation on PowerShell and MSI.
    • Tutorials focused on PowerShell scripting for automation and administrative tasks.

    Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии
  • Клавиша return на клавиатуре windows
  • Starblack for windows 10
  • Acpi tpsacpi01 windows 10
  • Как ускорить воспроизведение видео в windows media player
  • Настройка кнопки включения в windows 11