Bulk Uninstall - MDM on OSX and Windows

Solved
felix_fx2
Conversationalist

Bulk Uninstall - MDM on OSX and Windows

Hi Folks,

 

Got a good question, in need of a very good answer.

 

I currently have the need to remove CCleaner due to the malware payload of recent my bosses have decided to blacklist it all together.

I could click uninstall manually but sadly my fingers or mouse will likely fall apart of suffer a crap clicking 3K+ times & now i am looking for a easier way to uninstall all version of it in a more automatic method (this will prove very useful for other software in future).

 

btw, i can't see ccleaner in my windows software inventory list (but i can see everything else, likely a bug and a case already logged).

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

For Windows go to Systems Manager/Command Line.  Select all Windows machines.

 

Now the bit I am not sure of.  Try this:

C:\Program Files\CCleaner\uninst.exe /S

 

 

Failing that, try using "msiexec /u" and put in whatever package name CCleaner uses.

View solution in original post

5 Replies 5
PhilipDAth
Kind of a big deal
Kind of a big deal

For Windows go to Systems Manager/Command Line.  Select all Windows machines.

 

Now the bit I am not sure of.  Try this:

C:\Program Files\CCleaner\uninst.exe /S

 

 

Failing that, try using "msiexec /u" and put in whatever package name CCleaner uses.

This might also do it (not tested by me):

MsiExec.exe /uninstall{1827CDDB-1B8A-4A35-B365-60C1C8F79D0C}

That was good lead. i used the below,, thou it timed out on majority of systems.

 

"C:\Program Files\CCleaner\uninst.exe" /S

For those who want to do it via powershell (intune should have this as beta feature)

 

# Checking Presence of CCleaner
Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object DisplayName -match CCleaner

# Stopping CCleaner64 & CCleaner running process, this will have errors if it is not running. keep calm and carry on
stop-process -name CCleaner64 -force
stop-process -name CCleaner -force

# Starting uninstaller
if (Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
    Where-Object DisplayName -match CCleaner -OutVariable Results) {
    & "$($Results.InstallLocation)\uninst.exe" /S
}

# Removing install folder, this should prevent even if uninstall failed
Remove-Item "C:\Program Files\CCleaner" -Force

# Checking Presence of CCleaner
Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object DisplayName -match CCleaner

It may have timed out if the uninstall took longer than 45s - but still have completed the uninstall.

in which i have no visibility for (Completed/Failed/Timeout), one of the caveats for Meraki MDM.

I do have a case logged since ccleaner is shown in "program & features" but not the returned in the CLI which was used to capture.

 

But this section is really cool.. 

 

 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels