Skip to content

Instantly share code, notes, and snippets.

@vavavr00m
Forked from Nels2/RemoveWebroot.ps1
Created August 26, 2024 20:45
Show Gist options
  • Select an option

  • Save vavavr00m/7afac43a864b32116f9af0fed85d25c6 to your computer and use it in GitHub Desktop.

Select an option

Save vavavr00m/7afac43a864b32116f9af0fed85d25c6 to your computer and use it in GitHub Desktop.

Revisions

  1. @Nels2 Nels2 revised this gist Oct 13, 2022. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion RemoveWebroot.ps1
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,12 @@
    # Removes Webroot SecureAnywhere by force
    # Run the script once, reboot, then run again

    # below is to make sure script is being ran as admin so it works properly.
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
    {
    # Relaunch as an elevated process:
    Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs
    exit
    }
    # Webroot SecureAnywhere registry keys
    $RegKeys = @(
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
  2. @mark05e mark05e revised this gist Jul 26, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions RemoveWebroot.ps1
    Original file line number Diff line number Diff line change
    @@ -51,8 +51,8 @@ $Folders = @(
    )

    # Try to Uninstall - https://community.webroot.com/webroot-secureanywhere-antivirus-12/pc-uninstallation-option-missing-from-control-panel-34688
    Start-Process -FilePath "%ProgramFiles(x86)%\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue
    Start-Process -FilePath "%ProgramFiles%\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue
    Start-Process -FilePath "${Env:ProgramFiles(x86)}\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue
    Start-Process -FilePath "${Env:ProgramFiles}\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue

    # Stop & Delete Webroot SecureAnywhere service
    sc.exe stop WRSVC
  3. @mark05e mark05e revised this gist Jul 24, 2021. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions RemoveWebroot.ps1
    Original file line number Diff line number Diff line change
    @@ -6,22 +6,32 @@ $RegKeys = @(
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
    "HKLM:\SOFTWARE\WOW6432Node\WRData",
    "HKLM:\SOFTWARE\WOW6432Node\WRCore",
    "HKLM:\SOFTWARE\WOW6432Node\WRMIDData",
    "HKLM:\SOFTWARE\WOW6432Node\webroot",
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WRUNINST",
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
    "HKLM:\SOFTWARE\WRData",
    "HKLM:\SOFTWARE\WRMIDData",
    "HKLM:\SOFTWARE\WRCore",
    "HKLM:\SOFTWARE\webroot",
    "HKLM:\SYSTEM\ControlSet001\services\WRSVC",
    "HKLM:\SYSTEM\ControlSet001\services\WRkrn",
    "HKLM:\SYSTEM\ControlSet001\services\WRBoot",
    "HKLM:\SYSTEM\ControlSet001\services\WRCore",
    "HKLM:\SYSTEM\ControlSet001\services\WRCoreService",
    "HKLM:\SYSTEM\ControlSet001\services\wrUrlFlt",
    "HKLM:\SYSTEM\ControlSet002\services\WRSVC",
    "HKLM:\SYSTEM\ControlSet002\services\WRkrn",
    "HKLM:\SYSTEM\ControlSet002\services\WRBoot",
    "HKLM:\SYSTEM\ControlSet002\services\WRCore",
    "HKLM:\SYSTEM\ControlSet002\services\WRCoreService",
    "HKLM:\SYSTEM\ControlSet002\services\wrUrlFlt",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRSVC",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRkrn",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRBoot",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRCore",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRCoreService",
    "HKLM:\SYSTEM\CurrentControlSet\services\wrUrlFlt"
    )

    @@ -34,14 +44,23 @@ $RegStartupPaths = @(
    # Webroot SecureAnywhere folders
    $Folders = @(
    "%ProgramData%\WRData",
    "%ProgramData%\WRCore",
    "%ProgramFiles%\Webroot",
    "%ProgramFiles(x86)%\Webroot",
    "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Webroot SecureAnywhere"
    )

    # Try to Uninstall - https://community.webroot.com/webroot-secureanywhere-antivirus-12/pc-uninstallation-option-missing-from-control-panel-34688
    Start-Process -FilePath "%ProgramFiles(x86)%\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue
    Start-Process -FilePath "%ProgramFiles%\Webroot\WRSA.exe" -ArgumentList "-uninstall" -Wait -ErrorAction SilentlyContinue

    # Stop & Delete Webroot SecureAnywhere service
    sc.exe stop WRSVC
    sc.exe stop WRCoreService
    sc.exe stop WRSkyClient
    sc.exe delete WRSVC
    sc.exe delete WRCoreService
    sc.exe delete WRSkyClient

    # Stop Webroot SecureAnywhere process
    Stop-Process -Name "WRSA" -Force
  4. @wise-io wise-io revised this gist Apr 28, 2020. No changes.
  5. @wise-io wise-io created this gist Apr 28, 2020.
    65 changes: 65 additions & 0 deletions RemoveWebroot.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    # Removes Webroot SecureAnywhere by force
    # Run the script once, reboot, then run again

    # Webroot SecureAnywhere registry keys
    $RegKeys = @(
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
    "HKLM:\SOFTWARE\WOW6432Node\WRData",
    "HKLM:\SOFTWARE\WOW6432Node\webroot",
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WRUNINST",
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
    "HKLM:\SOFTWARE\WRData",
    "HKLM:\SOFTWARE\webroot",
    "HKLM:\SYSTEM\ControlSet001\services\WRSVC",
    "HKLM:\SYSTEM\ControlSet001\services\WRkrn",
    "HKLM:\SYSTEM\ControlSet001\services\WRBoot",
    "HKLM:\SYSTEM\ControlSet001\services\wrUrlFlt",
    "HKLM:\SYSTEM\ControlSet002\services\WRSVC",
    "HKLM:\SYSTEM\ControlSet002\services\WRkrn",
    "HKLM:\SYSTEM\ControlSet002\services\WRBoot",
    "HKLM:\SYSTEM\ControlSet002\services\wrUrlFlt",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRSVC",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRkrn",
    "HKLM:\SYSTEM\CurrentControlSet\services\WRBoot",
    "HKLM:\SYSTEM\CurrentControlSet\services\wrUrlFlt"
    )

    # Webroot SecureAnywhere startup registry item paths
    $RegStartupPaths = @(
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run",
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
    )

    # Webroot SecureAnywhere folders
    $Folders = @(
    "%ProgramData%\WRData",
    "%ProgramFiles%\Webroot",
    "%ProgramFiles(x86)%\Webroot",
    "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Webroot SecureAnywhere"
    )

    # Stop & Delete Webroot SecureAnywhere service
    sc.exe stop WRSVC
    sc.exe delete WRSVC

    # Stop Webroot SecureAnywhere process
    Stop-Process -Name "WRSA" -Force

    # Remove Webroot SecureAnywhere registry keys
    ForEach ($RegKey in $RegKeys) {
    Write-Host "Removing $RegKey"
    Remove-Item -Path $RegKey -Force -Recurse -ErrorAction SilentlyContinue
    }

    # Remove Webroot SecureAnywhere registry startup items
    ForEach ($RegStartupPath in $RegStartupPaths) {
    Write-Host "Removing WRSVC from $RegStartupPath"
    Remove-ItemProperty -Path $RegStartupPath -Name "WRSVC"
    }

    # Remove Webroot SecureAnywhere folders
    ForEach ($Folder in $Folders) {
    Write-Host "Removing $Folder"
    Remove-Item -Path "$Folder" -Force -Recurse -ErrorAction SilentlyContinue
    }