Category filter
Scripts to uninstall enterprise apps on Windows
Administrators might have to remove custom apps once their purpose is served or if they become outdated. They can deploy scripts via Hexnode to uninstall such enterprise apps.
Batch script
To uninstall .msi and .exe files,
1 |
wmic product where "name like '%%product_name%%’'" call uninstall/nointeractive |
For example, to remove the enterprise app 7-Zip,
wmic product where "name like “’7%%'" call uninstall/nointeractive
PowerShell script
To uninstall .msi and .exe files,
1 2 |
$app=Get-WmiObject –Class Win32_Product –Filter "Name like '%product_name%'" $app.Uninstall() |
For example, to remove the enterprise app 7-Zip,
$app=Get-WmiObject –Class Win32_Product –Filter "Name like '%7%'"
$app.Uninstall()
You can also uninstall the app using the app identifier.
1 |
msiexec.exe /x "app identifier" /quiet /norestart ALLUSERS=1 |
In the above script, replace app identifier with the app identifier of the enterprise app you want to uninstall.
For example, to uninstall the enterprise app 7-zip,
msiexec.exe /x "{23170F69-40C1-2702-2201-000001000000}" /quiet /norestart ALLUSERS=1
To find the app identifier of an enterprise app, follow the given steps.
On the portal,
- Navigate to the Applications page of a device with the enterprise app installed.
- Search for the required enterprise app.
- The last column lists the identifier of the application.