InstallScout

InstallScout – technical reference

Version 1.9.2. Short path: quickstart-en.html. Find the silent switches. The user workflow is in guide.html. This file covers engines, the command line, and Microsoft Graph. PDF: InstallScout-reference-en.pdf.

InstallScout does not run the installer. It reads the file, builds a silent command, wraps PSADT 4.1.8 as .intunewin, and creates a Win32 app.


1. Engines

An engine is recognized from byte markers in the file, PE section names, and sibling files. The highest score wins. base_confidence below is the starting value before extra evidence is added.

Wrappers (7-Zip SFX, WinRAR SFX, IExpress, Self Extractor, unknown EXE) are unpacked locally when the outer file has no reliable silent line. Clean engines such as Inno, NSIS, Wacom, and DDPM are not unpacked. InstallScout ships a bundled 7-Zip Extra 7za for 7z payloads, so a system 7-Zip install is not required.

/install is not added. It is already the default for WiX Burn. /norestart is not added either. Inno Setup keeps its own /NORESTART.

{file} is the quoted installer path. {product_code} is the MSI ProductCode. {app} is the installed folder PSADT knows at uninstall time.

IdNameSilent installAlternativeUninstallBase
msiWindows Installer (MSI)msiexec /i "{file}" /qnmsiexec /i "{file}" /qbmsiexec /x "{product_code}" /qn0.97
innoInno Setup"{file}" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"{file}" /SILENT /NORESTART"{app}\unins000.exe" /VERYSILENT /NORESTART0.95
wixburnWiX Burn"{file}" /quiet"{file}" /passive"{file}" /uninstall /quiet0.93
ddpmDell Display and Peripheral Manager"{file}" /Silent"{file}" /Silent /CreateDebugLog="%TEMP%\DDPM-install.log""{file}" /uninst /Silent0.93
advanced_installerAdvanced Installer"{file}" /exenoui /qn"{file}" /exenoui /passive /qn"{file}" /exenoui /x // /qn0.92
nsisNSIS"{file}" /S"{app}\uninstall.exe" /S0.90
wacomWacom Tablet Driver"{file}" /s"{file}" /s /opt nowdc"{file}" /s /u0.90
msixMSIX / AppXAdd-AppxPackage -Path "{file}"Add-AppxProvisionedPackage -Online -PackagePath "{file}" -SkipLicense0.90
self_extractorSelf Extractorharvested, otherwise the inner setup/uninst or /uninstall when present0.88
bitrockBitRock InstallBuilder"{file}" --mode unattended --unattendedmodeui none0.88
install4jinstall4j"{file}" -q0.85
installawareInstallAware"{file}" /s0.80
sevenzip_sfx7-Zip SFX"{file}" -y0.80
qt_installerQt Installer Framework"{file}" --silent --accept-licenses0.80
installshieldInstallShield"{file}" /s /v"/qn""{file}" /s /sms0.78
winrar_sfxWinRAR SFX"{file}" /S0.75
squirrelSquirrel"{file}" --silent0.72
clickonceClickOnceno reliable silent line0.70
iexpressIExpress"{file}" /Q0.70
wiseWise Installer"{file}" /s0.65

Rules that differ from the template

Suggested switches

At most 10. File flags come first (/analytics no, /sso no, and other name yes|no), then optional switches for the engine. /install and /norestart are not offered. A tick adds the switch to the silent line and invalidates the local .intunewin, so the package must be built again.

EngineOffered in addition to flags found in the file
MSIALLUSERS=1, REBOOT=ReallySuppress, /l*v "%TEMP%\install.log"
Inno/NORESTARTAPPLICATIONS, /LOG="%TEMP%\install.log", /MERGETASKS=!desktopicon
NSIS/NCRC
InstallShield/f2"%TEMP%\install.log"
WiX Burn/log "%TEMP%\install.log"
Advanced Installer/exenoupdates
Wise/l="%TEMP%\install.log"
DDPM/TelemetryConsent=false, /HeadlessMode=true, /CreateDebugLog=%TEMP%\DDPM.log, /TurnOffCA
Wacom/opt nowdc

Detection and the engine

Detection.ps1 writes to STDOUT and exits 0 when the app is installed. Empty STDOUT means not installed. The script does not throw.

SourceMatch
MSI ProductCode, or a GUID in the uninstall commandThat uninstall key, and version >=
EXE without a product codeDisplayName, Publisher, and version >=
MSIXPackage name, and version when known

A trailing Installer, Setup, Bootstrapper, or Driver word may be absent from DisplayName. Logi Options+ Installer matches Logi Options+, and Wacom Tablet Driver matches Wacom Tablet. The uninstall key name counts too. A key named as the product still counts when DisplayName, publisher, and version are missing, as long as the key has some other value. A value that is present must still match. The publisher may differ when DisplayName is the product name plus a version and the name is not a short word. WinRAR matches WinRAR 6.00 (64-bit) even when the file says Alexander Roshal and the key says win.rar GmbH. Git still requires the right publisher. A leftover generic word such as Advanced is not used. Legal suffixes are ignored, so Logitech, Inc. matches Logitech. Versions are compared numerically. The same version and newer count. Older does not. A hyphen revision such as 6.4.14-1 is satisfied by both 6.4.14-1 and 6.4.14.

Keys read: HKLM and HKCU under SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, in both the 32-bit and 64-bit views. That still holds when the script itself runs as 32-bit.


2. CLI

InstallScoutPortable.exe with no arguments opens the GUI. A frozen EXE also opens the GUI unless a CLI flag is set. From source, python -m installscout behaves the same way.

Any of these flags forces the CLI even without --cli: --json, --out, --psadt, --intune, --online, --sihq, --publish-intune, --switches, --icon, --supersede, --supersede-id, --outdated, --winget.

FlagMeaning
pathsFiles or folders. Suffixes: .exe, .msi, .com, .msix, .appx, .msixbundle, .appxbundle
--guiOpen the GUI even when paths are present
--cliForce text output
--jsonWrite the analysis as JSON on stdout
--out PATHWrite the same JSON to a file
--psadt DIRWrite the PSADT source, without .intunewin
--intune DIRWrite .intunewin, PSADT source, Intune.txt, and Detection.ps1
--no-copy-installerLeave the installer in place. The package points at the original path
--publish-intuneCreate the Win32 app. Requires --intune
--icon PATHPNG, JPEG, GIF, ICO, or BMP for largeIcon. Without the flag, the icon comes from the EXE, the MSI, or a sibling file
--supersede update|replaceSupersede older Win32 apps with a related name. At most 10
--supersede-id GUIDRepeatable. Use known app IDs instead of a name search
--no-supersedeWith --winget --publish-intune: do not supersede earlier versions. Otherwise update is the default there
--outdatedCompare the tenant's Win32 apps with the newest WinGet or Chocolatey version. Signs in. Changes nothing
--only TEXTWith --outdated: products whose name contains the text
--map "Name=Publisher.Package"With --outdated: confirm a match. Use Name=choco:id for Chocolatey. Repeatable. An empty ID forgets the match
--winget IDDownload the newest version of a WinGet package (or choco:id), verify its SHA256, analyze it, and build the package. Pair with --intune and --publish-intune
--winget-version VWith --winget: this version instead of the newest
--arch x64|x86|arm64With --winget: installer architecture. Default x64
--close-apps a,bWith --winget: programs to ask the user to close. The install command becomes -DeployMode Auto
--upgrade-testWith --winget: install the previous version and then the new one in Windows Sandbox, and check detection. Stops with exit code 5 unless the upgrade passes
--from-version VWith --upgrade-test: start from this version
--tenant IDEmpty means organizations
--client-id IDEmpty means Microsoft Graph PowerShell
--onlineWinGet and Chocolatey. Only the product name and vendor are sent
--sihqOpen a name search on silentinstallhq.com. The command is not overwritten
--switches TEXTAppend arguments to the silent line for every file in the run
--lang en|daLanguage of CLI text. The GUI keeps its own choice
-r / --recursiveSearch folders recursively. This is the default
--no-recursiveOnly the given folder
--versionPrint the version and exit

Exit code 0 is success. Exit code 2 is used when no supported file was found, --publish-intune is missing --intune, --icon cannot be read, a WinGet package cannot be read or packaged, or Windows Sandbox is missing. Exit code 3 means the download did not match the manifest's SHA256. Exit code 4 means the sandbox closed without a result. Exit code 5 means the upgrade test did not pass.

On startup, one anonymous call goes to Aptabase in the EU (eu.aptabase.com) with the version and language. File names and paths are not sent. INSTALLSCOUT_USAGE=0 turns the call off.

.\InstallScoutPortable.exe --cli .\setup.exe
.\InstallScoutPortable.exe --cli .\setup.exe --online
.\InstallScoutPortable.exe --cli .\setup.exe --switches "/LOG=C:\logs\app.log" --json --out .\analysis.json
.\InstallScoutPortable.exe --cli .\setup.exe --intune C:\out\intune
.\InstallScoutPortable.exe --cli .\setup.exe --intune C:\out\intune --publish-intune --icon .\logo.png --supersede update
.\InstallScoutPortable.exe --cli .\setup.exe --intune C:\out\intune --publish-intune --supersede replace --supersede-id <app-guid>

--json is a list of analysis objects: path, engine, confidence, commands, harvested switches, option_flags, VersionInfo, MSI properties, and notes. The first command with purpose silent_install is the recommended line.

The install line written to the portal is always PSADT, not the raw silent command:

.\Invoke-AppDeployToolkit.exe -DeploymentType Install -DeployMode Silent
.\Invoke-AppDeployToolkit.exe -DeploymentType Uninstall -DeployMode Silent

When a package lists programs to close (--close-apps or the Update check window), the install line is -DeployMode Auto instead, and the app also gets return code 1602 as retry:

.\Invoke-AppDeployToolkit.exe -DeploymentType Install -DeployMode Auto

setupFilePath is Invoke-AppDeployToolkit.exe.


3. Graph

The Win32 fields detectionRules, displayVersion, and maxRunTimeInMinutes exist on Graph beta, not on v1.0. App calls therefore go to https://graph.microsoft.com/beta. GET /me for whoami goes to https://graph.microsoft.com/v1.0.

Sign-in

OAuth 2.0 authorization code with PKCE. Device code is not used. A local HTTP listener on http://localhost:<port>/ receives the code. The browser opens in the Edge work profile when that profile can be recognized.

Authorityhttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize and /token
Default tenantorganizations
Default client14d82eec-204b-4c2f-b7e8-296a70dab67e (Microsoft Graph PowerShell, public client)
ScopesDeviceManagementApps.ReadWrite.All, User.Read, offline_access, openid, profile
Token file%LOCALAPPDATA%\InstallScout\graph.json, Windows DPAPI for the current user (ISC1). Bound to the tenant and Client ID. Plaintext is deleted
RefreshRefresh token. A 401 is retried once after refresh. An expired session deletes the token file. A different tenant or Client ID does not reuse the session

A custom Client ID must be a public client with redirect http://localhost and the same permission. InstallScout does not create an app registration. The signed-in user must be able to create Win32 apps. The Entra role Intune Administrator, or the Intune role Application Manager, includes that. The tenant still needs admin consent for DeviceManagementApps.ReadWrite.All.

Create and upload

  1. POST /deviceAppManagement/mobileApps with #microsoft.graph.win32LobApp.
  2. POST .../microsoft.graph.win32LobApp/contentVersions.
  3. POST .../contentVersions/{version}/files with the encrypted size and the unencrypted size.
  4. Poll the file until azureStorageUri is present.
  5. PUT the encrypted blob in 6 MiB blocks.
  6. POST .../files/{id}/commit with fileEncryptionInfo.
  7. PATCH the app with committedContentVersion.

If upload or commit fails, the new app is deleted. Supersedence runs afterwards and does not delete the app if it fails.

Encryption matches Microsoft Win32 Content Prep: AES-CBC, a 256-bit key, HMAC-SHA256, ProfileVersion1, digest SHA256. The key, IV, MAC, and digest are sent at commit. The installer binary is not sent during the online lookup, only inside the encrypted .intunewin.

App payload

FieldValue
displayNameThe name from the dialog, otherwise {product} {version}. At most 500 characters
publisherVendor, or the product name when the vendor is Unknown. At most 500
displayVersionAnalyzed version. At most 50 characters
descriptionEngine, context, and detection summary. At most 4000
installCommandLine / uninstallCommandLinePSADT Silent, as above
setupFilePathInvoke-AppDeployToolkit.exe
applicableArchitecturesx64, x86, or arm64
minimumSupportedWindowsReleaseWindows10_22H2
installExperience.runAsAccountsystem or user
installExperience.deviceRestartBehaviorsuppress (No specific action)
installExperience.maxRunTimeInMinutes60
allowAvailableUninstalltrue
detectionRulesOne PowerShell script, enforceSignatureCheck false, runAs32Bit false, body base64 UTF-8
largeIconOmitted when there is no logo. Otherwise mimeContent as PNG, JPEG, or GIF
returnCodes0 success, 1707 success, 3010 softReboot, 1641 hardReboot, 1618 retry

The logo comes from an EXE/DLL/COM resource, from the MSI Icon table (ARPPRODUCTICON, otherwise a shortcut, otherwise the only icon), from logo.png / icon.ico next to the file, or from the file the user picks. Several icons with no ARPPRODUCTICON and no shortcut are left unused.

Supersedence

Search is GET /deviceAppManagement/mobileApps with $filter=startswith(displayName,'…') and $top=50, at most 5 pages. The whole catalogue is not downloaded. The search term is the product name, not the edited Intune display name.

POST /deviceAppManagement/mobileApps/{id}/updateRelationships with #microsoft.graph.mobileAppSupersedence:

supersedenceTypeMeaning
updateInstall the new app without uninstalling the old one first
replaceUninstall the old app, then install the new one

At most 10 targets. The GUI selects nothing automatically. The CLI with --supersede selects apps whose names look like the product.

Portal link after success:

https://intune.microsoft.com/#view/Microsoft_Intune_Apps/SettingsMenu/~/0/appId/{appId}

4. Windows Sandbox

Try in Sandbox is an optional GUI button. There is no CLI flag. It appears after Analyze, and only when WindowsSandbox.exe is installed. Packaging and upload stay available while the test runs. The result comes back in this window when the test finishes.

The button runs the current silent command inside a new Windows Sandbox, then the same Detection.ps1 that upload sends to Intune. Empty detection output means not installed. The sandbox shows a message with the install exit code and that detection result. InstallScout reads the same text back into this window.

The command must contain the installer path. A package folder (the setup plus MSI, CAB, prerequisites, or a subfolder the installer needs) is mapped read-only at C:\InstallScout\Installer. A file directly in Downloads, Desktop, Documents, the OneDrive root, Temp, or the user profile is copied into the sandbox work folder, so the parent folder is not shared. That still applies when the folder has been redirected. A subfolder there, for example Downloads\PSADT - CutePDF, is still a package folder. The work folder is writable. Networking is enabled. On a PC with free RAM, the sandbox gets up to 8 GB of memory instead of the 4 GB default ceiling. Only one Windows Sandbox can run at a time. Closing the sandbox discards it. If you close it before a result comes back, the button turns back on so you can change the command and run it again. Nothing is installed on this PC.

The sandbox also lists the programs the installer added: new .exe files under Program Files and %LOCALAPPDATA%\Programs, written to processes.txt. The Update check window uses that list as suggestions for programs to close.

Upgrade test

The Update check window and --upgrade-test use a second report script. It installs the old version (install_old.cmd, from payload_old), runs the new Detection.ps1, installs the new version (install_new.cmd, from payload_new), and runs detection again. The verdict:

VerdictMeaning
okDetection said not installed with the old version and installed with the new one
old_failedThe old version did not install
detection_laxDetection already said installed with the old version. Intune would never update
new_failedThe upgrade failed
detection_missingDetection does not find the new version. Intune would reinstall it forever
incompleteThe sandbox closed or the report is partial

5. Third-party updates (beta)

Source: the WinGet community repository microsoft/winget-pkgs. Nothing but the product name, the publisher, and a package ID leaves the PC.