AutomoxAutomox

uninstall Adobe Shockwave Player

anuj.johri
July 10, 2024 at 4:20 pm UTC
#Worklets#automox#adobe

Hi all, 

I’m looking for a script to uninstall Adobe Shockwave Player (regardless of the version) from Windows. 

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (1)

JohnG-AutomoxJuly 11, 2024
#1

Hi @anuj.johri !

 

This sounds like a great use case for Automox’s Worklet Development Kit!

 

Within the WDK we have a few pre-written functions that you can use for simplifying software installs.

  • Get-Win32App will allow you to easily check to see if a specific software is installed.
  • Remove-Win32App will allow you to perform a targeted uninstall of a specific software.

 

With these two functions in mind, we can cook up a low-code worklet to uninstall Adobe Shockwave!

 

Evaluation code:

powershell10 lines
$appName = 'Adobe Shockwave'
$installed = Get-Win32App | Where-Object { $_.Name -like "*$appName*" }

if ( $installed ) {
    Write-Output "$appName was detected. `nFlagging for Remediation."
    exit 99
}

Write-Output "$appName not detected. `nDevice is compliant."
exit 0

 

Remediation Code:

powershell12 lines
$appName = 'Adobe Shockwave'
$uninstall = Get-Win32App | Where-Object { $_.Name -like "*$appName*" } | Remove-Win32App -AdditionalArgs '/S'

if ( $uninstall.Exitcode -ne 0 ) {
    Write-Error "$appName uninstall has failed."
    exit 1
}

else {
    Write-Output "$appName uninstall was successful."
    exit 0
}

 

I hope that helps!