Skip to content

Deployment Recipes

jebepoix edited this page Nov 27, 2026 · 1 revision

Deployment Recipes

Ready-to-adapt examples for deploying the setup .exe on many machines. The reference (options, exit codes, detection rule, logs) is in the Runbook; these recipes only apply it.

Replace X.Y.Z with the release version and <sha256> with the content of the .exe.sha256 file of that release.

Common facts

Item Value
Install command UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe /S
Uninstall command "C:\Program Files\UsdShellExtension\uninstall.exe" /S _?=C:\Program Files\UsdShellExtension
Run as Administrator or SYSTEM, 64-bit
Success codes 0, 3010 (soft reboot)
Failure codes 1 (cancelled, interactive only), 2 (aborted or registration failed)
Detection HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension, value DisplayVersion = X.Y.Z.0
Install log C:\Windows\Temp\UsdShellExtension_setup.log when run as SYSTEM

Keep _?=<install folder> last and unquoted in the uninstall command: without it the uninstaller returns before the uninstall is done.

Chocolatey

tools\chocolateyInstall.ps1:

$ErrorActionPreference = 'Stop'

$packageArgs = @{
  packageName    = $env:ChocolateyPackageName
  fileType       = 'exe'
  url64bit       = 'https://github.com/LoopsCreativeStudio/USDShellExtension/releases/download/vX.Y.Z/UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe'
  checksum64     = '<sha256>'
  checksumType64 = 'sha256'
  silentArgs     = '/S'
  validExitCodes = @(0, 3010)
}
Install-ChocolateyPackage @packageArgs

For an internal repository without internet access, put the .exe in tools\ and use Install-ChocolateyInstallPackage with file64 instead of url64bit.

tools\chocolateyUninstall.ps1:

$ErrorActionPreference = 'Stop'

# The install folder is stored by the setup in its Uninstall key.
$uninstallKey    = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension'
$installLocation = (Get-ItemProperty -Path $uninstallKey -ErrorAction SilentlyContinue).InstallLocation

if (-not $installLocation -or -not (Test-Path (Join-Path $installLocation 'uninstall.exe'))) {
  Write-Warning 'USD Shell Extension is not installed, nothing to uninstall.'
  return
}

$packageArgs = @{
  packageName    = $env:ChocolateyPackageName
  fileType       = 'exe'
  file           = Join-Path $installLocation 'uninstall.exe'
  # _?= must be last and unquoted, even with spaces in the path.
  silentArgs     = "/S _?=$installLocation"
  validExitCodes = @(0, 3010)
}
Uninstall-ChocolateyPackage @packageArgs

Intune (Win32 app)

  1. Put the setup .exe alone in a folder and package it with the Microsoft Win32 Content Prep Tool:

    IntuneWinAppUtil.exe -c C:\Pkg\UsdShellExtension -s UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe -o C:\Pkg\Out
  2. Program

    • Install command: UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe /S
    • Uninstall command: "C:\Program Files\UsdShellExtension\uninstall.exe" /S _?=C:\Program Files\UsdShellExtension
    • Install behavior: System
    • Device restart behavior: Determine behavior based on return codes
    • Return codes: keep 0 Success and 3010 Soft reboot; add 2 Failed.
  3. Requirements: 64-bit, Windows 10 or later.

  4. Detection rule: Registry

    • Key path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension
    • Value name: DisplayVersion
    • Detection method: Version comparison, Equals, X.Y.Z.0
    • Associated with a 32-bit app on 64-bit clients: No

    Alternative: File, C:\Program Files\UsdShellExtension\UsdPreviewLocalServer.exe, Version, Greater than or equal to X.Y.Z.

For an update, create a new app version and set it to supersede the previous one, or simply assign the new version: the setup uninstalls the previous one itself.

SCCM / ConfigMgr (application)

  1. Create an application, deployment type Script Installer, content folder holding the setup .exe.
  2. Installation program: UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe /S
  3. Uninstall program: "C:\Program Files\UsdShellExtension\uninstall.exe" /S _?=C:\Program Files\UsdShellExtension
  4. Detection method: Registry, hive HKEY_LOCAL_MACHINE, key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension, value DisplayVersion, data type Version, Equals X.Y.Z.0. Check This registry key is associated with a 64-bit application.
  5. User experience: Install for system, Whether or not a user is logged on.
  6. Return codes: 3010 is a Soft Reboot by default; add 2 as Failure.

GPO (computer startup script)

The setup runs as SYSTEM before any user logs on, so Explorer restarts are invisible. Put the setup on a share readable by Domain Computers, then use this startup script:

@echo off
rem Install or update the USD Shell Extension only when the version differs.
set VERSION=X.Y.Z.0
set SETUP=\\server\share\UsdShellExtension\UsdShellExtension-vX.Y.Z-u25.08-p3.12-setup.exe

for /f "tokens=3" %%V in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension" /v DisplayVersion 2^>nul ^| find "DisplayVersion"') do set INSTALLED=%%V

if "%INSTALLED%"=="%VERSION%" exit /b 0
"%SETUP%" /S
exit /b %ERRORLEVEL%

Checking a deployment

On a target machine:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UsdShellExtension' |
  Select-Object DisplayVersion, InstallLocation, QuietUninstallString
Get-Content "$env:windir\Temp\UsdShellExtension_setup.log" -Tail 20

The log is UTF-16; Get-Content reads it as is.

Clone this wiki locally