<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Powershell or Batch To uninstall]]></title><description><![CDATA[<p dir="auto">Hello Everyone</p>
<p dir="auto">Somehow our tool pushed out Opera Stable 99.0.4788.13. I am unable to create a powershell script or a batch file to do a silient uninstall.  I was able to get a batch file the calls the uninstall but it still require user input to select uninstall.</p>
<pre><code>@echo off
taskkill /IM opera.exe /F
taskkill /IM opera_autoupdate.exe /F
taskkill /IM opera_crashreporter.exe /F
taskkill /IM opera_gpu_launcher.exe /F
taskkill /IM opera_plugin_wrapper.exe /F
taskkill /IM opera_stable.exe /F
taskkill /IM opera_updater.exe /F
start /wait "" "%PROGRAMFILES(x86)%\Opera\launcher.exe" --uninstall --deleteuserprofile=1 
rd /s /q "%PROGRAMFILES%\Opera"
rd /s /q "%APPDATA%\Opera Software"
rd /s /q "%LOCALAPPDATA%\Opera Software"
</code></pre>
<p dir="auto">Any help would be appreciated.</p>
]]></description><link>https://forums.opera.com/topic/65355/powershell-or-batch-to-uninstall</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 12:45:19 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/65355.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Aug 2023 17:06:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Powershell or Batch To uninstall on Mon, 21 Aug 2023 20:44:20 GMT]]></title><description><![CDATA[<p dir="auto">Working Powershell Script to do a slient install</p>
<pre><code>[CmdletBinding()]
param (
  [Parameter()]
  [switch]$DeleteUserProfile,
  [Parameter()]
  [String]$installDirectory
)

begin {
  function Test-IsSystem {
    $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
    return $id.Name -like "NT AUTHORITY*" -or $id.IsSystem
  }
}
process {
  if (-not (Test-IsSystem)) {
    Write-Error -Message "This script needs to run as System (in order to hide the gui)."
    exit 1
  }

  $PotentialInstallLocations = New-Object System.Collections.Generic.List[Object]


  $ProgramFiles = Get-ChildItem $env:ProgramFiles -ErrorAction SilentlyContinue | Where-Object { $_.PSIsContainer -eq $true -and $_.Name -like "*Opera*" } | Select-Object Fullname
  if ($ProgramFiles) { $ProgramFiles | ForEach-Object { $PotentialInstallLocations.Add($_) } }

  $ProgramFilesX86 = Get-ChildItem ${env:ProgramFiles(x86)} -ErrorAction SilentlyContinue | Where-Object { $_.PSIsContainer -eq $true -and $_.Name -like "*Opera*" } | Select-Object Fullname
  if ($ProgramFilesX86) { $ProgramFilesX86 | ForEach-Object { $PotentialInstallLocations.Add($_) } }

  $AppData = Get-ChildItem C:\Users\*\AppData\Local\Programs -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.PSIsContainer -eq $true -and $_.Name -like "*Opera*" } | Select-Object Fullname
  if ($AppData) { $AppData | ForEach-Object { $PotentialInstallLocations.Add($_) } }

  if ($installDirectory) {
    $Directory = Get-Item $installDirectory -ErrorAction SilentlyContinue
    if ($Directory) { $PotentialInstallLocations.Add($Directory) }
  }

  if ($PotentialInstallLocations) {
    $OperaExe = $PotentialInstallLocations | ForEach-Object { Get-ChildItem $_.FullName | Where-Object { $_.Name -like "opera.exe" } }
    $LauncherExe = $OperaExe | ForEach-Object { "$($_.Directory)\launcher.exe" | Where-Object { Test-Path $_ -ErrorAction SilentlyContinue } }
  }
  
  if ($LauncherExe) {

    Write-Host "Opera installations found! Below are the install locations."
    $LauncherExe | Write-Host

    # Killing All Opera Processes
    Write-Warning "Killing all Opera Processes for uninstall."
    Get-Process "opera" -ErrorAction SilentlyContinue | Stop-Process -Force
    Get-Process "OperaSetup" -ErrorAction SilentlyContinue | Stop-Process -Force

    if ($DeleteUserProfile) {
      Write-Warning "Delete User Browser Profile Selected!"
      $Arguments = "--uninstall", "--runimmediately", "--deleteuserprofile=1"
    }
    else {
      $Arguments = "--uninstall", "--runimmediately", "--deleteuserprofile=0"
    }

    $Process = $LauncherExe | ForEach-Object {
      Start-Process -Wait $_ -ArgumentList $Arguments -PassThru 
    }
    Write-Host "Exit Code(s): $($Process.ExitCode)"

    $Process | ForEach-Object {
      switch ($_.ExitCode) {
        0 { Write-Host "Opera removal Success! Please note that Opera will still be visible in the Control Panel however it won't prompt for admin to remove it from the control panel when clicking uninstall." }
        default {
          Write-Error "Exit code does not indicate success"
          exit 1
        }
      }
    }

    $TaskbarLocations = Get-ChildItem -Recurse "C:\Users\*\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" -ErrorAction SilentlyContinue | Where-Object { $_.Name -like "Opera Browser.lnk" } | Select-Object FullName

    if ($TaskbarLocations) {
      Write-Host "Cleaning up taskbar icons. Please note the taskbar icon will still be visible (though it won't prompt for admin to remove it from the taskbar)."
      Write-Host "### Taskbar Icon Locations ###"
      $TaskbarLocations.FullName | Write-Host
      $TaskbarLocations | ForEach-Object {
        Remove-Item $_.FullName
      }
    }
    else {
      Write-Host "No Taskbar Icons found!"
    }

    $DesktopIcons = Get-ChildItem -Recurse "C:\Users\*\Desktop" -ErrorAction SilentlyContinue | Where-Object { $_.Name -like "Opera Browser.lnk" } | Select-Object FullName

    if ($DesktopIcons) {
      Write-Host "Cleaning up Desktop icons."
      Write-Host "### Desktop Icon Locations ###"
      $DesktopIcons.FullName | Write-Host
      $DesktopIcons | ForEach-Object {
        Remove-Item $_.FullName
      }
    }
    else {
      Write-Host "No Desktop Icons found!"
    }

    $StartMenu = Get-ChildItem -Recurse "C:\Users\*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" -ErrorAction SilentlyContinue | Where-Object { $_.Name -like "Opera Browser.lnk" } | Select-Object FullName

    if ($StartMenu) {
      Write-Host "Cleaning up Start Menu."
      Write-Host "### StartMenu Locations ###"
      $StartMenu.FullName | Write-Host
      $StartMenu | ForEach-Object {
        Remove-Item $_.FullName
      }
    }
    else {
      Write-Host "No Start Menu Entries found!"
    }

  }
  else {
    Write-Error "No installations found in C:\Users\*\AppData\Local\Programs, C:\Program Files or C:\Program Files(x86). Maybe give an installation directory using -InstallDirectory 'C:\ReplaceMe' ?"
    Exit 1
  }
}

</code></pre>
]]></description><link>https://forums.opera.com/post/323493</link><guid isPermaLink="true">https://forums.opera.com/post/323493</guid><dc:creator><![CDATA[jmason]]></dc:creator><pubDate>Mon, 21 Aug 2023 20:44:20 GMT</pubDate></item><item><title><![CDATA[Reply to Powershell or Batch To uninstall on Wed, 16 Aug 2023 17:11:55 GMT]]></title><description><![CDATA[<p dir="auto">See <a href="https://forums.opera.com/post/266906">https://forums.opera.com/post/266906</a>. The silent uninstall switch was purposely disabled by Opera. It's also noted at the bottom of <a href="https://www.reddit.com/r/operabrowser/wiki/opera/installer_commands/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.reddit.com/r/operabrowser/wiki/opera/installer_commands/</a> that it's no longer supported.</p>
]]></description><link>https://forums.opera.com/post/322965</link><guid isPermaLink="true">https://forums.opera.com/post/322965</guid><dc:creator><![CDATA[burnout426]]></dc:creator><pubDate>Wed, 16 Aug 2023 17:11:55 GMT</pubDate></item></channel></rss>