Author Topic: How to do a silent uninstall?  (Read 17223 times)

0 Members and 1 Guest are viewing this topic.

REDACTED

  • Guest
How to do a silent uninstall?
« on: March 14, 2015, 07:14:53 AM »
How may I uninstall Avast Antivirus silently, without any prompts or clicking.

I've tried passing parameters to the UninstallString like:
Code: [Select]
& "C:\Program Files\AVAST Software\Avast\Setup\Instup.exe" /instop:uninstall /silent
But no luck. 
Because of the protecting services Avast runs, it seems like a silent uninstall may not be possible without a reboot.  I would be fine with it set to uninstall at the next reboot.

Apparently a program called aswclear.exe is supposed to do exactly this.  However, attempting to download aswclear.exe (http://files.avast.com/files/aswclear.exe) redirects me to avastclear.exe (http://files.avast.com/iavs9x/avastclear.exe).  It looks like aswclear.exe has been deprecated and used to allow passing /verysilent to achieve this.  However, I can't figure out the argument to pass to avastclear.exe to achieve this same thing.

Has anyone figured out a way to silently uninstall Avast?

Ref:
how to do this with aswclear.exe https://forum.avast.com/index.php?topic=47354.0
somewhat related; info about the installers used https://forum.avast.com/index.php?topic=81104.msg775764#msg775764
« Last Edit: March 14, 2015, 07:25:59 AM by Adam121 »

REDACTED

  • Guest
Re: How to do a silent uninstall?
« Reply #1 on: January 31, 2017, 08:24:04 PM »
I really want to do this as well. I've combed these forums and tried the avastclear.exe files from various releases. All no luck.

Here's what I currently have:

Code: [Select]
start "C:\Program Files\AVAST Software\Avast\Setup\Instup.exe" "/control_panel /instop:uninstall"
It just opens up the installer from control panel. Is there a silent switch or documented list of commands that can be passed to this exe?

Offline Pondus

  • Probably Bot
  • ****
  • Posts: 37532
  • Not a avast user
Re: How to do a silent uninstall?
« Reply #2 on: January 31, 2017, 08:34:43 PM »
Quote
Has anyone figured out a way to silently uninstall Avast?
Have uinstalled avast many times, never heard a sound      ;D   




REDACTED

  • Guest
Re: How to do a silent uninstall?
« Reply #3 on: January 31, 2017, 08:36:57 PM »
Quote
Has anyone figured out a way to silently uninstall Avast?
Have uinstalled avast many times, never heard a sound      ;D   

I hear my users screaming because Avast wants to give them "Free Gifts!" lol

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89057
  • No support PMs thanks
Re: How to do a silent uninstall?
« Reply #4 on: January 31, 2017, 08:37:44 PM »
As I recall there are some command switches, but they are only available in the paid versions and I believe they are install related.

I don't believe there is command function for a silent uninstall.
If a silent uninstall was even possible, it would be so easy for malware to do exactly the same thing.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Pondus

  • Probably Bot
  • ****
  • Posts: 37532
  • Not a avast user
Re: How to do a silent uninstall?
« Reply #5 on: January 31, 2017, 08:43:23 PM »
If you Google   avast command line you find some info, but as David say it don't work in free version


REDACTED

  • Guest
Re: How to do a silent uninstall?
« Reply #6 on: January 31, 2017, 09:48:48 PM »
I created this powershell script based on uninstall logs, it seems to work on Windows 7, and puts a dent in Windows 10. However in Windows 10 even the system user doesn't have permission to stop the avast process or delete the avast folders.

Code: [Select]
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\aswWebRepIE.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/s /u C:\Program Files\AVAST Software\Avast\aswWrcIEBroker32.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\aswWebRepIE64.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\aswWebRepIE64.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\aswAMSI.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\aswAMSI.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\x64\aswAMSI.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\x64\aswAMSI.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\asOutExt.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\asOutExt.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\x64\asOutExt.dll"
start "C:\Program Files\AVAST Software\Avast\x64\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\x64\asOutExt.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\AhAScr.dll"
start "C:\Program Files\AVAST Software\Avast\RegSvr.exe" "/U C:\Program Files\AVAST Software\Avast\AhAScr.dll"
start "C:\Program Files\AVAST Software\Avast\aswRunDll.exe" "C:\Program Files\AVAST Software\Avast\ashBase.dll,_basDeinstallCertificatesFromInstup@16"
start "C:\Program Files\AVAST Software\Avast\aswRunDll.exe" "C:\Program Files\AVAST Software\Avast\ashMaiSv.dll,Deinstall"
start "C:\Program Files\AVAST Software\Avast\aswRunDll.exe" "C:\Program Files\AVAST Software\Avast\Setup\Instup.dll,_AcsStopSoftwareUpdater@16"


Stop-Process -processname avast* -Force
Stop-Service Avast* -Force
Stop-Process -processname asw* -Force
Stop-Service asw* -Force

$service = Get-WmiObject -Class Win32_Service -Filter "Name='aws'"
$service.delete()
$service = Get-WmiObject -Class Win32_Service -Filter "Name='avast'"
$service.delete()

start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswNdisFlt.cat /netservice:aswNdisFlt /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/netservice:sw_aswNdis /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswNetNd6.cat /netservice:aswNetNd6 /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/netservice:sw_aswNdis /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswNetNd6.cat /netservice:aswNetNd6 /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswKbd.cat /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswRdr2.cat /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswHwid.cat /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswVmm.cat /uninstall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/catalog:aswRvrt.cat /uninstall"
start "C:\Program Files\AVAST Software\Avast\wsc_proxy.exe" "/svc /unregister /firewall"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/uninstall /catalog:aswTap.cat"
start "C:\Program Files\AVAST Software\Avast\OpenVPN\driver\win64\ndis6\tapinstall.exe" "remove aswTap"
start "C:\Program Files\AVAST Software\Avast\x64\SetupInf.exe" "/uninstall /catalog:aswTap.cat"
start "C:\Program Files\AVAST Software\Avast\SetupInf.exe" "/uninstall /catalog:aswTap.cat"
start "C:\Program Files\AVAST Software\Avast\SetupInf.exe" "/uninstall /catalog:aswTap.cat"
start "C:\Program Files\AVAST Software\SZBrowser\launcher.exe" "/uninstall /silent"
start "C:\Program Files\AVAST Software\SZBrowser\launcher.exe" "/uninstall /silent"
start "C:\Program Files\AVAST Software\Avast\bcc.exe" "--farewell"
start "C:\Program Files\AVAST Software\Avast\AvastEmUpdate.exe" "/installer /unreg"
start "C:\Program Files\AVAST Software\Avast\AvastNM.exe" "/uninstall"
start "C:\Program Files\AVAST Software\Avast\wsc_proxy.exe" "/svc /unregister /antivirus /antispyware"


Unregister-ScheduledTask -TaskPath "AVAST Software"
$scheduleObject = New-Object -ComObject schedule.service
$scheduleObject.connect()
$AVASTFolder = $scheduleObject.GetFolder("AVAST Software")
$AVASTFolder.DeleteTask("Avast settings backup", $null)
$AVASTFolder.DeleteTask("Avast upgrade utility", $null)
$rootFolder = $scheduleObject.GetFolder("")
$rootFolder.DeleteFolder("AVAST Software", $null)


Remove-Item "C:\avast! sandbox" -Force -Recurse
Remove-Item "C:\Program Files\Avast*" -Force -Recurse
Remove-Item "C:\Program Files (x86)\Avast*" -Force -Recurse

Any insight would be appreciated.
We used to have Avast Business, then when we upgraded all clients to Windows 10 the free version of Avast installed itself, it's now unmanageable.

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89057
  • No support PMs thanks
Re: How to do a silent uninstall?
« Reply #7 on: January 31, 2017, 09:54:55 PM »
Obviously an open forum isn't the sort of location to be discussing how to silently uninstall avast, even if your script only puts a dent in the win10 installations of avast.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Eddy

  • Avast Evangelist
  • Maybe Bot
  • ***
  • Posts: 31079
  • Watching (over?) you
    • Malware removal, Biljart and other things.
Re: How to do a silent uninstall?
« Reply #8 on: January 31, 2017, 10:03:00 PM »
After installing W10, you should have deployed avast again to the clients.

REDACTED

  • Guest
Re: How to do a silent uninstall?
« Reply #9 on: January 31, 2017, 10:59:27 PM »
After installing W10, you should have deployed avast again to the clients.

The boss doesn't want that, our goal is to remove it all together.

Offline Eddy

  • Avast Evangelist
  • Maybe Bot
  • ***
  • Posts: 31079
  • Watching (over?) you
    • Malware removal, Biljart and other things.
Re: How to do a silent uninstall?
« Reply #10 on: January 31, 2017, 11:01:52 PM »
Well, in that case you should have removed avast from the clients before the upgrade.