Eugene Raynor

How to deploy Windows apps with parameters (scripts)

Eugene Raynor

Jan 7, 2022

11 min read

In the present IT scenario, organizations are provided with several options to deploy enterprise apps to Windows devices. These include sideloading apps, deploying apps via Windows Store for Business, enforcing app deployment using a Unified Endpoint Management solution, and more.

But what if your IT team needs to specify HOW the installation process should be conducted? For example, what if they need to specify the app’s install location, decide whether the user should see the installation UI, enable installation logging to monitor and record errors, or even perform an automatic restart after installation?

This is where the need for deploying Windows apps with parameters come up.

Secure your Windows devices with Hexnode UEM

What is Windows app deployment with parameters (scripts)?

Deploying Windows apps by including command-line parameters is a process that enables IT admins to specify how the installation process should proceed on users’ endpoints. It defines the install instructions, configuration settings, and the custom executable actions that should be performed as part of the enterprise app installation. By passing parameters to Windows apps during deployment, you enable organizations to elevate their app distribution capabilities and streamline the overall experience for both IT teams and end-users.

Why and when do you need to deploy Windows apps with parameters?

Let’s take a look at some of the key instances where organizations would require IT to deploy Windows apps with parameters.

IT deploying apps to Windows devices
IT deploying apps to Windows devices
 

Installing apps that require license verification

Many Windows business apps demand license verification during the installation process. As a result, the app may require the end-user to input a digital alphanumeric code or key to proceed with the installation. However, providing your end-users with the validation key for your organization’s purchased business apps may not always be a good idea.

What’s more, the standard Windows app deployment process using UEM will fail for such apps, citing unsuccessful verification. This is because Windows apps deployed via UEM solutions are designed to be silently installed, with no end-user intervention, and hence, Windows will not complete the license verification process.

In cases such as these, specifying additional parameters during Windows app deployment can get the job done.

Note

The MSI app you plan to deploy must support the use of parameters for license activation. You can ask the application vendor to provide you with the sample license activation commands.

Streamlining user experience during app install

Organizations can also customize end-user experience during the Windows app installation process. By default, when deploying Windows apps via Hexnode UEM, the apps are silently installed with no user involvement.

However, by passing parameters during app deployment, IT can make it such that the end-user can interact with either a minimal or complete installation process, or just set it up such that the end-user simply receives a dialogue box that indicates successful app install.

What’s more, IT can even specify the install location of the app, and also determine if the Windows device should perform automatic restart after completing the installation process.

Providing the option to troubleshoot app deployments

By specifying parameters during app deployment, organizations can enable installation logging to keep a record of all the details regarding the specific app’s installation on end-users’ devices.

If enabled, Windows automatically creates an installation log file at the location you specify, which then records all the necessary information, including terminal properties, non-fatal warnings, action-specific records, out-of-memory or fatal exit information messages, and more.

This, in turn enables IT to identify and resolve any issues that may occur during Windows app deployment.

What are the parameters you can pass while deploying Windows apps?

The following are the parameters IT can specify when deploying Windows apps to end-users’ devices. Depending on the MSI app, IT can specify different kinds of installation options.

Important

  • All command-line arguments are dependent on the MSI packaging. The MSI app you plan to deploy must support the following command-line arguments.
  • When specifying two or more parameters, separate them using spaces
      • Eg: /qb /norestart /ln
  • You must also make sure the parameters you specify do not conflict with each other. Adding conflicting parameters may lead to unintended behaviour on the device.

Install parameters

You can configure the install parameters to specify how and where you want Windows to install the app on end-users’ devices.

List of install parameters
Parameter  Description 
/i  Performs normal installation. 
/a  Performs administrative installation. 
/ju  Advertise the app to the current user. 
/jm  Advertise the app to all users. 
/j/g  Specifies the language identifier used by the advertised app package. 
/j/t  Applies transform to the advertised app package. 
/x  Uninstalls the app package. 

Syntax

Example

Display/UI parameters

You can configure the display parameters to determine what the end-user sees during the installation process. You can decide whether the user should see the full UI, a basic or reduced UI, or just a dialog box that indicates successful install.

List of display/UI parameters
Parameter  Description 
/quiet  Install the app with no user intervention 
/passive  Install the app in unattended mode (show only progress bar) 
/qn  Hide UI during app installation 
/qn+  Hide UI during app installation, except for a final dialog box at the end. 
/qb  Show only basic UI during app installation. 
/qb+  Show only basic UI during app installation, along with a final dialog box at the end. 
/qr  Provide a reduced UI experience during app installation. 
/qf  Provide the full UI experience during app installation. 

Syntax

Example

Restart parameters

You can configure parameters to specify restart options, especially if your app installation package overwrites files or attempts to change files that are in use.

List of restart parameters
Parameter  Description 
/norestart  Prevents the device from restarting after the installation completes. 
/promptrestart  Prompts the user to restart the device after the installation is complete. 
/forcerestart  Automatically restarts the device after the installation completes. 

Syntax

Example

Logging parameters

You can configure parameters to specify logging options for debugging your installation package and record all the details regarding the specific app’s installation/uninstallation in a log file.

List of logging parameters
Parameter  Description 
/li  Enables logging and adds status messages in the log file. 
/lw  Enables logging and adds non-fatal warnings in the log file. 
/le  Enables logging and adds all error messages in the log file. 
/la  Enables logging and adds information about when an action started in the log file. 
/lr  Enables logging and adds action-specific records in the log file. 
/lu  Enables logging and adds user request information in the log file. 
/lc  Enables logging and adds the initial UI parameters in the log file. 
/lm  Enables logging and adds out-of-memory or fatal exit information in the log file. 
/lo  Enables logging and adds out-of-disk-space messages in the log file. 
/lp  Enables logging and adds terminal properties in the log file. 
/lp  Enables logging and adds terminal properties in the log file. 
/lv  Enables logging and adds verbose in the log file. 
/lp  Enables logging and adds terminal properties in the log file. 
/lx  Enables logging and adds extra debugging information in the log file. 
/l+  Enables logging and appends the information to an existing log file. 
/l!  Enables logging and flushes each line to the log file. 
/l*  Enables logging and logs all information, except verbose information (/lv) or extra debugging information (/lx). 

Syntax

Example

Update parameters

You can configure parameters to apply or remove updates using an app installation package.

List of update parameters
Parameter  Description 
/p  Installs the patch.  
/update  Install patches option. If you’re applying multiple updates, separate them using a semi-colon (;). 
/package  Install or configure a package. 

Syntax

Install example

Uninstall example

Repair parameters

If you need to repair your installation package, you can configure the following parameters during app deployment to repair your installed app package.

List of repair parameters
Parameter  Description 
/fp  Repairs the app package if a file is missing. 
/fo  Repairs the app package if a file is missing, or if an older version is installed. 
/fe  Repairs the app package if a file is missing, or if an equal or older version is installed. 
/fd  Repairs the package if a file is missing, or if a different version is installed. 
/fc  Repairs the package if a file is missing, or if the checksum does not match the calculated value. 
/fa  Reinstall all files 
/fu  Repairs all the user-specific registry entries. 
/fm  Repairs all the computer-specific registry entries. 
/fs  Repairs all existing shortcuts. 
/fv  Runs from source and re-caches the local package. 

Syntax

Example

How to deploy Windows apps with parameters using Hexnode

Hexnode enables organizations to streamline the process of specifying installation parameters and enables IT to deploy Windows apps to end-user devices. IT admins can configure the app installation settings directly from the UEM console, and initiate the app installation with the help of Hexnode’s customizable options.

Featured resource

Hexnode Windows Management Solution

Manually controlling devices can put your organizational data at risk. A UEM/MDM solution makes it easier to deploy and manage all your Windows devices and applications.

Download datasheet
Note

  • Hexnode supports deploying Windows MSI apps with parameters to end-user devices.
  • Organizations can specify parameters for Windows Enterprise apps that are uploaded to the Hexnode app inventory. Although you can deploy Windows Store apps to end-user devices, organizations cannot specify install parameters for Store apps.
  • Parameters you can specify with Hexnode UEM are limited to those that do not tamper or conflict with the silent installation operation on end-user devices. By default, Hexnode passes the /quiet command to hide the user interface (install UI) and proceed with silent app installation. Visit our help documentation to view the complete list of parameters supported by Hexnode.

There are two methods to specify the command-line arguments while distributing Windows apps using Hexnode.

Method – 1

Navigate to the Manage tab from your organization’s Hexnode portal and select all the Windows devices where you plan to deploy the specific app. After completing the selection, push the Install application action, and specify the required configurations. Once done, Confirm the configurations to deploy the app.

This method is best suited when deploying one specific Windows app to end-user devices.

Method – 2

Navigate to the Policies tab from your organization’s Hexnode portal and configure the Mandatory app policy for Windows devices. Next, choose the enterprise apps your organization plans to deploy and specify the required parameters and configurations for each app. Once done, confirm the configurations and push the policy to deploy the apps to your end-users.

This method is best suited when deploying multiple Windows apps with different parameters and configurations to end-user devices.

Final note

Specifying parameters when deploying Windows apps is an excellent way to customize your organization’s app installation processes and elevate your Windows app deployments. Moreover, employing Hexnode’s Unified Endpoint Management (UEM) solution for app management and deployment enables IT to further streamline the Windows app deployment process and save considerable time and costs for your business.
Array

Share
Eugene Raynor

Seeking what's there lurking over the horizon.

Share your thoughts