Repository navigation
Uninstallable Key
The uninstallable key in Cimian catalogs allows you to control whether a package can be uninstalled. This feature is based on Munki's implementation and provides both explicit control and automatic determination of uninstallability.
You can explicitly set whether an item can be uninstalled:
# Example: Package that should never be uninstalled
name: "critical-system-component"
version: "1.0.0"
installer:
type: "msi"
location: "/packages/critical-component-1.0.0.msi"
hash: "abc123..."
uninstallable: false # Explicitly prevent uninstalling# Example: Package that can always be uninstalled
name: "optional-tool"
version: "2.1.0"
installer:
type: "exe"
location: "/packages/optional-tool-2.1.0.exe"
hash: "def456..."
uninstaller:
location: "/packages/optional-tool-uninstaller.exe"
arguments: ["/S"]
uninstallable: true # Explicitly allow uninstallingWhen the uninstallable key is omitted (or set to null), Cimian automatically determines if the item can be uninstalled based on these criteria:
- Items with explicit uninstallers:
name: "app-with-uninstaller"
version: "1.0.0"
installer:
type: "exe"
location: "/packages/app-1.0.0.exe"
uninstaller:
location: "/packages/app-uninstaller.exe"
arguments: ["/quiet"]
# uninstallable: auto-determined as true- MSI packages (built-in uninstall support):
name: "msi-application"
version: "3.2.1"
installer:
type: "msi"
location: "/packages/app-3.2.1.msi"
# uninstallable: auto-determined as true- Chocolatey packages:
name: "choco-package"
version: "1.5.0"
installer:
type: "nupkg"
location: "/packages/app.1.5.0.nupkg"
# uninstallable: auto-determined as true- MSIX / APPX packages:
name: "store-app"
version: "2.0.0"
installer:
type: "msix"
location: "/packages/store-app-2.0.0.msix"
installs:
- type: msix
identity_name: com.example.storeapp
version: 2.0.0
uninstaller:
- type: msix
identity_name: com.example.storeapp
# uninstallable: auto-determined as true (via the installs entry's identity_name).
# cimiimport auto-emits both blocks when importing a .msix file.
# Install runs Add-AppxProvisionedPackage -Online; uninstall runs
# Remove-AppxProvisionedPackage -Online with the resolved PackageFullName
# that was persisted to HKLM\SOFTWARE\ManagedInstalls\<Name> at install time.
# Note: currently-signed-in users must log out/back in to see a newly provisioned app.- Items with registry checks:
name: "registry-tracked-app"
version: "1.1.0"
installer:
type: "exe"
location: "/packages/app-1.1.0.exe"
check:
registry:
name: "MyApplication"
version: "1.1.0"
# uninstallable: auto-determined as true- Items with installs array (trackable files/directories):
name: "file-tracked-app"
version: "1.0.0"
installer:
type: "exe"
location: "/packages/app-1.0.0.exe"
installs:
- type: "file"
path: "C:\Program Files\MyApp\app.exe"
version: "1.0.0"
# uninstallable: auto-determined as true- OnDemand items (never considered "installed"):
name: "on-demand-script"
version: "1.0.0"
installer:
type: "powershell"
location: "/scripts/maintenance-script.ps1"
OnDemand: true
# uninstallable: auto-determined as false- EXE installers without uninstaller or tracking:
name: "simple-exe"
version: "1.0.0"
installer:
type: "exe"
location: "/packages/simple-app-1.0.0.exe"
# No uninstaller, registry check, or installs array
# uninstallable: auto-determined as false- PowerShell scripts without tracking:
name: "configuration-script"
version: "1.0.0"
installer:
type: "powershell"
location: "/scripts/configure-system.ps1"
# No tracking mechanism
# uninstallable: auto-determined as falseThe uninstallable check is enforced at multiple levels:
-
Status Check Level:
CheckStatus()in the status package will returnfalsefor uninstall operations on non-uninstallable items -
Installer Level:
uninstallItem()will fail early if the item is marked as non-uninstallable -
Removal Identification:
identifyRemovals()will skip items that are not uninstallable
name: "windows-updates"
version: "2024.01"
installer:
type: "msi"
location: "/packages/critical-updates.msi"
uninstallable: false # System critical, should never be removedname: "visual-studio-code"
version: "1.85.0"
installer:
type: "exe"
location: "/packages/VSCode-1.85.0.exe"
uninstaller:
location: "/packages/VSCode-uninstaller.exe"
arguments: ["/SILENT"]
# uninstallable: auto-determined as true (has uninstaller)name: "antivirus-engine"
version: "2024.1.0"
installer:
type: "msi"
location: "/packages/antivirus-2024.1.0.msi"
uninstallable: false # Prevent accidental removal of security softwareThis implementation provides both the flexibility of explicit control and the convenience of automatic determination, following Munki's proven approach to package uninstallability.
Cimian — managed software deployment for Windows, modelled on Munki. Apache License 2.0. Source and issues at windowsadmins/cimian.
Start here
Repository
Authoring packages
- Installation Checks
- Uninstall Methods
- Uninstallable Key
- Conditional Items
- Importing EXE Bundle Installers
- PowerShell Execution Policy
- Chocolatey Shim Prevention
- Managed Profiles and Apps
Client runtime
Diagnostics
- Troubleshooting
- Logging
- Error Reporting
- Item Source Traceability
- CimiTrigger Troubleshooting
- Privilege Elevation
Integrations
Contributing