Skip to main content
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

The folder holds two files: 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

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.1 isn’t made of plain numbers, so Intune’s registry rule can’t compare it. The sheet then tells you to use detect.ps1.
  • A setup file with [access] needs its key: add --key-file FILE to 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: 0 is success and 1 a failure, which are Intune’s defaults too.
See also Silent installs and bach winget.