Skip to main content

Hi all, 

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

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:

$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:

$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!


Reply