bach intune writes down what Microsoft Intune, Configuration Manager or a similar tool needs to deploy a setup file that isn’t an MSI: a silent install command, an uninstall command and a rule that says the app is installed. Bach already has all three. The command collects them, so you don’t dig them out of the docs.
Output
With
--json the command prints install_command, uninstall_command, run_as (system or user), detection_key (machine-wide apps only) and detection_script.
Machine-wide or per user
- Machine-wide
- Per user
Set
installer.scope = "machine" for devices. Intune runs setup as the system account, so nothing asks for permission, and the registry rule works.Notes
- The commands use the default install folder. If you install somewhere else with
--dir, point the uninstall command there too. - A version like
2.0.0-beta.1isn’t made of plain numbers, so Intune’s registry rule can’t compare it. The sheet then tells you to usedetect.ps1. - A setup file with
[access]needs its key: add--key-file FILEto the install command and put the key file in the package. - Keep the app id and the scope the same in every release. Windows tells apps apart by them.
- The exit codes are the ones in exit codes:
0is success and1a failure, which are Intune’s defaults too.
bach winget.