WinGet

Introduction

With Relution 5.26, it is possible to use the WinGet package manager for app deployments on Windows devices.

Requirements

  1. The WinGet client must be installed on the device. It is available on all Windows 11 versions and on Windows 10 from version 2004 (May 2020 Update)
  2. The Microsoft Visual C++ Redistributable must be installed on the device, see Limitations.
  3. Relution Server version 5.26 or higher
  4. Windows Companion version 1.11 or higher
  5. WinGet version 1.6 or higher

Supported Features

The WinGet features in Relution are marked with a Beta flag. Therefore each feature should be tested with a test device for each WinGet app. Please see the limitations and known issues sections for more details.

  • Query and add WinGet apps to Relution AppStore
  • Deploy WinGet apps via action, app compliance and auto deployments
  • Show installed WinGet apps in the installed apps list of a device
  • Remove WinGet apps via action
  • Automatic update of WinGet apps on the devices

Add WinGet apps to Relution AppStore

WinGet apps must be added to the Relution AppStore before they can be deployed on devices.

  1. Choose the WinGet AppStore WinGet app store

  2. Search for the WinGet app name and add it to the Relution AppStore Add WinGet app

  3. When the app is added to Relution AppStore, the app icon is added to the details, if possible.

The WinGet app details can contain additional information like installation scope, if it is provided for the WinGet app. Additional WinGet app details

Deploy WinGet apps

After the WinGet app has been added to the Relution AppStore and the App is in the state Release, it can be deployed to Windows devices.

Relution must install the WinGet app completely silently, see Limitations. Due to this limitation all source and package agreements are automatically accepted when installing a WinGet app via Relution!

Deploy via action

Select Deploy Relution Store app in the action modal of a Windows device.

WinGet deploy app action

Choose the WinGet app to be deployed.

Add WinGet app

In the next step the deployment can optionally be adjusted. This is currently only possible for the deploy action and not for the app compliance or the auto deployments.

  • Installer type: Specify the installer type to be used, see supported installer types. The app must support the specified installer type or the install will fail.
  • Locale: Specify the locale to be used (BCP47 format)
  • Timeout: Specify the time in minutes until the Windows Companion aborts the installation
  • Force: Runs the command and continues with non security related issues
  • Uninstall previous on upgrade: The previous version of the app is uninstalled on upgrade
  • Skip upgrade: Skips the upgrade if a previous version is already installed
  • Custom parameters: Passes the specified arguments on to the installer in addition to the defaults

Add WinGet app

After the confirmation in the last step a deploy app action is created.

Deploy via app compliance

WinGet apps can be added to the App Compliance of a Windows policy.

Add WinGet app

Deploy via auto deployments

Winget apps can be added to the auto deployments of an user.

Add WinGet app

Remove WinGet apps via action

It is possible to remove WinGet apps via action from the device.

The Windows Companion will execute the winget uninstall command silently, see Limitations. Due to this limitation the source agreements are automaticlly accepted when removing a WinGet app from the device.

Add WinGet app

Automatic update of WinGet apps on the devices

Relution will automatically update installed WinGet apps on the devices.

Requirements:

  • The WinGet app must be added to the Relution app store
  • The WinGet app must be contained in the installed apps list of the device

The Relution app store checks every day for each contained WinGet app, whether an update is available and refreshes the information of the app. When a device refreshes its details Relution compares the version of the installed WinGet app with the version in the Relution app store. If it detects a newer version in the Relution app store, it triggers a deploy app action for this device and the app gets updated.

If the version comparison fails, the automatic update is not triggered (see Known issues)

Limitations

Microsoft Visual C++ Redistributable must be installed

The Windows Companion executes WinGet commands in system context. This requires that the Microsoft Visual C++ Redistributable is installed on the device.

When the Windows Companion starts, it checks if this dependency is installed. If it is missing the Companion tries to download and install it. If it could not be installed, the Windows Companion writes a log entry into the event viewer on the device.

If this issue occurs, WinGet actions will fail. The error code 1073741515 of the failed action can be an indicator for this. In that case it is possible to install the latest Microsoft Visual C++ Redistributable manually as a native app with a detection rule, see Known issues

WinGet client must be installed on the device

Relution does not install or update the WinGet client on the devices. The WinGet client is available on all Windows 11 versions and on Windows 10 from version 2004 (May 2020 Update). It is packaged in the AppInstaller, which can be retrieved from the Microsoft store.

Only silent install and uninstall is supported

The WinGet app installation or uninstallation is executed by the Windows Companion. The Windows Companion is a background process, which cannot show any UI on the device. Therefore it will fail to install or remove the app, if it cannot be executed completely silent.

The Windows Companion will automatically add all possible commands to execute the install or uninstall silently:

  • winget install
    • –silent
    • –disable-interactivity
    • –accept-package-agreements
    • –accept-source-agreements
  • winget uninstall
    • –silent
    • –disable-interactivity
    • –accept-source-agreements

But for some apps even those commands do not prevent the app from showing a dialog. One example is Mozilla Firefox during uninstallation.

Known issues

It is recommended to test the install and uninstall of each WinGet app on a test device before using it in production.

If the WinGet app should be used in an app compliance or in auto deployments, it must be contained in the installed apps list on the device after it has been installed and the device details have been refreshed.

If the automatic update of an installed WinGet app is important, the installed apps list must contain the app and have a correct value in the version column.

Some apps cannot be prevented from showing a dialog

If an app cannot be prevented from showing a dialog the install or uninstall will fail.

It may be possible to use a different installer in the deploy app action to work around this issue.

How to find out

  • Open PowerShell as administrator on a test device
  • Execute the command winget install –id –silent –disable-interactivity –accept-source-agreements –accept-package-agreements with replaced for installation
    • If no dialog or prompt is shown, the app can be installed silently
    • Otherwise, retry it with another installer by adding –install-type to the command, if the app supports more than one.
  • Execute for uninstallation winget install –id –silent –disable-interactivity –accept-source-agreements
  • If no dialog or prompt is shown, the app can be removed silently

Alternative

If the app cannot be installed or uninstalled, we suggest to use a native app with detection rules instead.

Some apps cannot be installed in system context

The WinGet client is currently not supported to be used in system context. But the Windows Companion runs in this context and therefore for some apps the installation might fail.

How to find out

  • Test if the app can be installed silently on a test device, see Known Issues.
  • Remove the app from the test device again.
  • Install the same app on the same test device via Relution
  • If the installation fails, it might not be installable via system-context

Alternative

If the app cannot be installed or uninstalled, we suggest to use a native app with detection rules instead.

Some apps are not shown the installed apps list

Some apps are not shown in the installed apps, although WinGet recognizes them as installed. This app must not be used in an app compliance configuration or in auto deployments, because it can currently not be detected correctly and that would cause a lot of failing deploy actions

How to find out

  • Install a WinGet app on a test device
  • Refresh the device details in Relution
  • The app should be shown in the installed apps

Alternative

If this issue occurs, we suggest to use a native app with detection rules instead.

Some apps have wrong values in the installed apps list

Some detected WinGet apps have wrong values in the installed apps list, f.e. for the version. These apps can still be used in the app compliance configuration, but if the version is incorrect the automatic update might not work.

How to find out

  • Install a WinGet app on a test device
  • Refresh the device details in Relution
  • The app is shown in the installed apps list, but has wrong values in the columns

Alternative

If the automatic update of this app is not important, it can be used. Otherwise we suggest to use a native app with detection rules instead.

Duplicate detection of installed apps

If native apps with detection rules have been deployed on a device, the app might be shown twice in the installed apps list.

This does not mean that the app is installed twice.

It just means that the app is detected by the detection rule and by WinGet.

How to find out

  • Install an app with detection rule a test device
  • Refresh the device details in Relution
  • The app is shown twice the installed apps list. The name other shown information might not be exactly the same

Alternative

Currently there is no alternative for this behaviour. The duplicate entries can only be prevented, if the corresponding native app with detection rule is removed from Relution app store and the WinGet app is used instead.

Due to the limitations and known issues of WinGet apps it is not recommended to switch from native apps with detectin rules to WinGet apps!

Missing dependency Microsoft Visual C++ Redistributable

As mentioned in limitations section the dependency Microsoft Visual C++ Redistributable is required to be able to work with WinGet apps in Relution.

Therefore, the Windows Companion tries to install it on the device, if it is missing. This check is executed when the Windows Companion is started, f.e. after it is fresh installed or the device is rebooted.

It may happen that the automatic installation of the Microsoft Visual C++ Redistributable fails, which causes all WinGet commands to fail.

How to find out

  • Install a WinGet app via Relution
  • The app is not installed on the device
  • The action is marked as failed and eventually contains the error code 1073741515

Alternative

The latest Microsoft Visual C++ Redistributable can be manually installed as a native app with a detection rule.

  1. Download the .exe file for the architecture (x64, arm64, x86) of the device
  2. Add a new native app
  • It is suggested to add the architecture in the app name to avoid confusion, f.e. VC Redist x64
  • Suggested install parameters: /install /quiet /norestart
  • Suggested uninstall parameters: /uninstall /quiet
  • Path to uninstaller: must be determined for each version and architecture, see below
  • Suggested detection rule:
    • Registry
    • Registry key: HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\{x64|x86|arm64}, see Microsoft documenation
    • Registry value name: Version
    • Detection method: A value with the specified name exists
  1. Deploy the app on the devices with the same architecture
  2. The action should succeed
  3. Refresh the device details
  4. The app should be contained in the installed app list

How to detect the path to the uninstaller:

  • Open the registry key: HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
  • Search for the key of the vc_redist.{x64|x86|arm64}.exe. The key is a product code, f.e. {2d48c97b-0c1e-4160-b3c4-c6dabebde745}
  • The path to the uninstaller can be found in the value: QuietUninstallString, f.e. C:\ProgramData\Package Cache\{2d48c97b-0c1e-4160-b3c4-c6dabebde745}\VC_redist.arm64.exe