Prepare the source
Keep the source directory deterministic and exclude build artifacts, logs, and unrelated installers. Use the Microsoft Win32 Content Prep Tool to create a single package, then record the source version alongside the application revision.
Make detection version-aware
Use a registry or file version rule that matches the product’s real install location. A rule that only checks existence can report success after a partial or obsolete install.
IntuneWinAppUtil.exe -c .\Source -s .\Install.ps1 -o .\Output
# Install command: powershell.exe -ExecutionPolicy Bypass -File .\Install.ps1Control requirements and recovery
Set architecture and minimum operating system requirements before assignment. Map vendor exit codes deliberately, and use dependencies for prerequisites rather than hiding them inside a long install script.
Operational checklist
- Version the source and detection rule together.
- Test install, upgrade, uninstall, and retry.
- Declare requirements before broad assignment.
- Document reboot and user notification behavior.