Skip to content

Instantly share code, notes, and snippets.

@nhalstead
Created December 31, 2018 06:22
Show Gist options
  • Save nhalstead/4ed68a54c32a102b763b8437af186301 to your computer and use it in GitHub Desktop.
Save nhalstead/4ed68a54c32a102b763b8437af186301 to your computer and use it in GitHub Desktop.
This will Remove AVG from the Local Machine.
REM Cleanup
del /F /Q C:\Toolkit\*
REM Setup for AVG Removal
mkdir C:\Toolkit
cd /d C:\Toolkit && certutil.exe -urlcache -split -f "https://install.avcdn.net/avg/iavs9x/avgclear.exe" avgclear.exe
cd /d C:\Toolkit && echo C:\Toolkit\avgclear.exe /norestart /skipask /silent >>avgclear.log > "avgclear.bat"
cd /d C:\Toolkit && echo Dim WinScriptHost > "avgclear.vbs"
cd /d C:\Toolkit && echo Set WinScriptHost = CreateObject("WScript.Shell") >> "avgclear.vbs"
cd /d C:\Toolkit && echo WinScriptHost.Run Chr(34) ^& ^"avgclear.bat^" ^& Chr(34), 0 >> "avgclear.vbs"
cd /d C:\Toolkit && echo Set WinScriptHost = Nothing >> "avgclear.vbs"
REM Start
cd /d C:\Toolkit && "avgclear.vbs"
REM Monitor Command
tasklist /FI "IMAGENAME EQ avgclear.exe"
@IMS-IT-Subscriptions
Copy link

Hi there, this is an awesome script, however, the popup is still presented, any way around that?

@nhalstead
Copy link
Author

You most likely are getting the popup because you are running it on the machine as a user, this script is designed to be running from an ssh like interface in windows, In this specific use case, I was at a support desk executing this script via an RMM tool that had an execution limit but does not have any UI elements that are shown to the user as it would run in the background.

As far as it's still showing the dialog, what part is being shown, a few parts could be showing this, the better information provided could help determine what needs to be changed.

@IMS-IT-Subscriptions
Copy link

IMS-IT-Subscriptions commented Jan 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment