DEV Community

Victor James
Victor James

Posted on • Originally published at windowscmd.com on

MSIEXEC Windows Command

MSIEXEC

MSIEXEC

The MSIEXEC windows command-line tool is a Microsoft Windows Installer. Let’s see about this command-line tool detail below.

CMD Line

CMD Line is a text-based interface that transfers the command from the user to the OS.

CLI-Command Line Interpreter

The command-line interpreter (CLI) for windows is CMD.EXE. Also, you can use PowerShell which can automize many system administration tasks and these tasks are not approachable in command prompt. With the help of the CLI, you can communicate with your system by typing the text in commands. As a result, your system answers to the text that you have typed previously, and then the user can proceed with the next command line that shows up.

To open the Run command Window

Run command window helps you to run programs, open the files and folders. And there are several ways to open up the run command dialog box. This run command box is useful for you to head straight to the destined program easily.

By using the Keyboard shortcut Key:

WINDOWS+R

The shortcut key method to the run command box is the most commonly used one. Also, this method is in all versions of Windows. You need to press the Windows+ R key concurrently to open the Run command dialog box.

Run command box
Run command box

What does the MSIEXEC windows command do?

The MSIEXEC windows command-line tool is a Microsoft Windows installer. This command-line tool is to install and execute actions on the Windows installer. This command is to install products on the specified systems from the command line.

Syntax


 MSIEXEC /Option RequiredParameter [OptionalParameter]

Enter fullscreen mode Exit fullscreen mode

Install options

  • Code to install or configure a product

MSIEXEC /package Product.msi
      MSIEXEC /i Product.msi

Enter fullscreen mode Exit fullscreen mode
  • Code to Administrative install , Install a product on the network

 MSIEXEC /a Product.msi

Enter fullscreen mode Exit fullscreen mode
  • This code is to Advertise a product to all users

MSIEXEC /j m Product.msi [/t TransformList] [/g LanguageID]

Enter fullscreen mode Exit fullscreen mode
  • Code to advertise a product to the current user

MSIEXEC /j u Product.msi [/t TransformList] [/g LanguageID]

Enter fullscreen mode Exit fullscreen mode
  • Code to Uninstall the product

      MSIEXEC /uninstall Product.msi
      MSIEXEC /x Product.msi
      MSIEXEC /uninstall ProductCode
      MSIEXEC /x ProductCode

Enter fullscreen mode Exit fullscreen mode

Display Options

  • Quiet mode, no user interaction

/quiet

Enter fullscreen mode Exit fullscreen mode
  • Unattended mode progress bar only

/passive

Enter fullscreen mode Exit fullscreen mode
  • Code to set user interface level: None

 /qn

Enter fullscreen mode Exit fullscreen mode
  • To set user interface level: Basic UI

/qb

Enter fullscreen mode Exit fullscreen mode
  • To set user interface level: Reduced UI

/qr

Enter fullscreen mode Exit fullscreen mode
  • Set user interface level: Full UI (default)

/qf

Enter fullscreen mode Exit fullscreen mode

Options for Restart

  • Code not to restart after the installation is complete

/norestart

Enter fullscreen mode Exit fullscreen mode
  • Code to Prompt the user for restart if necessary

 /promptrestart

Enter fullscreen mode Exit fullscreen mode
  • For to restart the computer after installation

/forcerestart

Enter fullscreen mode Exit fullscreen mode
  • Options for Logging

  • /le Logfile- Log All error messages

  • /lw Logfile- Log Non-fatal warnings

  • /li Logfile- Log Status messages

  • /la Logfile- Log Start up of actions

  • /lr Logfile- Log Action-specific records

  • /lu Logfile- Log User requests

  • /lc Logfile- Log Initial (UI) parameters

  • /lm Logfile- Log Out-of-memory or fatal exit information

  • /lo Logfile- Log Out-of-disk-space messages

  • /lp Logfile- Log Terminal properties

  • /lv Logfile- Log Verbose output

  • /lx Logfile- Log Extra debugging information

  • /l* Logfile- Log all information , except for v and x options

  • /log Logfile- Equivalent of /l.

  • /l+ Logfile- Append to an existing log file.

  • /l! Logfile- Flush each line to the log.

Options to Update

  • Code to Apply updates

/update [;Update2.msp]

Enter fullscreen mode Exit fullscreen mode
  • Code to remove updates for a product

/uninstall [;Update2.msp] /package 

Enter fullscreen mode Exit fullscreen mode

Options for Repair

  • /fp- Repairs missing files
  • /fo- Repairs Older files
  • /fe- Repairs older or Equal date files
  • /fd- Repairs Different version files
  • /fc- Repairs files based on Checksum differences
  • /fa- Replace All files
  • /fu- Rewrite HKCU registry
  • /fm- Rewrite HKLM registry
  • /fs- Recreate shortcuts
  • /fv- Rewrite local cache from source

Set Public Properties


[PROPERTY=PropertyValue]

Enter fullscreen mode Exit fullscreen mode
  • It is recommended not to use the domain controller SYSVOL folder as a Windows Installer installation point if used, an error occurs when you attempt to run the Windows Installer (.msi) package, thus the error shows up as

This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.

  • This is because of the SYSOL folder created with the SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS attribute, as a result, it blocks it from being exclusively locked by Windows Installer. Thus, it will build Active Directory service synchronization problems.

Examples

  • To install use this

msiexec /i "C:\Install\salesapp.msi"

Enter fullscreen mode Exit fullscreen mode
  • To Uninstall, you can use this

msiexec /uninstall "{5AFF6499-63BA-4A36-83B2-8D256404AC3D}" /log "C:\install\salesapp.txt"

Enter fullscreen mode Exit fullscreen mode
  • For to restart the computer after installation use

msiexec.exe /i "C:\sales.msi" /forcerestart

Enter fullscreen mode Exit fullscreen mode

Verdict

In this guide, we have stated the MSIEXEC windows command-line tool with its syntax and examples. Hope you find this article a useful one. Leave your valuable comments in the comment box regarding this article.

Related Articles

  • MSIEXEC The MSIEXEC windows command-line tool is a Microsoft Windows installer. This command-line tool is to install and execute actions on the Windows installer.
  • MSINFO32 The MSINFO32 windows command is for displaying the system information.
  • NBTSTAT The NBTSTAT windows command-line tool is for displaying protocol statistics and current TCP/IP connections using NBT.
  • NETSTAT The NETSTAT windows command-line tool displays the networking statistics. This command displays the current TCP/IP network connections and protocol statistics.
  • MD The MD windows command-line tool is for creating a new directory. By using this MD windows command, you can create one or multiple folders or directories.

The post MSIEXEC appeared first on Windows Commands- SS64 Commands.

Discussion (0)