-
-
Save mark05e/708123de4c095ffb4f735c131d8cc783 to your computer and use it in GitHub Desktop.
| # 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\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" | |
| ) | |
| # 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", | |
| "%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 "${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 | |
| 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 | |
| # 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 | |
| } |
Worked. Ran script as system through our RMM agent to new client. Also worked when running through powershell on individual user device
Thanks for the script. There is one more folder C:\Program Files\Common Files\Webroot
Thanks for the script. Though it does get rid of some of Webroot, it has been obsoleted by Webroot, unfortunately.
The first is called CleanWDF.exe. Run it. The second is called WRUpgradeTool.exe. Run it. Don't worry, it is a removal tool, and won't upgrade/install anything. I don't know why it is misnamed so.
The Webroot Tool doesn't work.
Hey all, I've forked the script and improved upon it, adding outputs, known uninstall keys, and more folder paths.
https://gist.github.com/asheroto/4b1313fc41b3801a1362d421ff577406
I was able to get this to work - but had to boot into safe mode with the WRx services disabled and then run the script. When I get systems in to refurb it is sometimes faster to uninstall all the junk and remove the old user account - and some items like this are stubborn. I have also sometimes walked through the registry replace all the instances of the original user's name.
Thanks for the script. Though it does get rid of some of Webroot, it has been obsoleted by Webroot, unfortunately.
This link on the webroot site has links to two small removal utilities you can download and run to get rid of Webroot for good. This is the best/fastest solution.
The first is called CleanWDF.exe. Run it.
The second is called WRUpgradeTool.exe. Run it. Don't worry, it is a removal tool, and won't upgrade/install anything. I don't know why it is misnamed so.