How To Detect If AVG exe Really Runs (Solving An AVG Install Issue) ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
war59312
Posts: 10
Joined: 07 Feb 2017 20:17
Location: U.S.A
Contact:

How To Detect If AVG exe Really Runs (Solving An AVG Install Issue) ?

#1 Post by war59312 » 09 Feb 2017 12:51

Hi,

AVG is such a terrible product, but the government agency I work for has already paid for it for the next 2 years, so I'm stuck with it. :(

Anyways... I've found 66 different versions of AVG installed on our PCs. Ouch!

I've written a huge script to try and force the removal of AVG and reinstall it. Works 99.95% of the time.

The issue is sometimes, AVG appears to be installed and working, but it's not.

I thought I could just look to see if avgui.exe and avguix.exe are running along with the service, avgsvc.

But even that fails because it's easy to duplicate AVG in a bad state where all the expected files exist and even the service exists and is running. I already account for the situation if that is not the case, files missing and or service not installed and running.

I need a way to try and run AVG itself, the UI and see if it runs or not.

At the moment I came up with this script below.

hide is simply a shell that runs the avg ui even if it errors out, like file does not exist. It errors silently.

Code: Select all

hide "C:\Program Files (x86)\AVG\Av\avgui.exe" /detectGoodAVG

REM Checks If AVG UI Will Run With My Special Command Line Argument
WMIC path win32_process get Caption,Processid,Commandline | findstr /i "detectGoodAVG" | findstr /v "findstr" >NUL  2>NUL

REM ErrorLevel Will Be Zero If AVG Runs OK - Otheerwise It Will Be 1
echo ERRORLEVEL is %ERRORLEVEL%

REM AVG Wont Start
If ERRORLEVEL 1 GoTo AVGIsNOTRunning

REM AVG Started OK
GoTo AVGIsRunning

:AVGIsRunning
SET AVGStatus=AvgIsGood
GoTo CheckIfGoodAVGRunning

REM AVG Did NOT Start
:AVGIsNOTRunning
SET AVGStatus=AvgIsBad

:CheckIfGoodAVGRunning
REM Open AVG UI Only If Installed Successfully
If %AVGStatus% == AvgIsGood (
REM AVG UI Is Working Correctly
REM Echo Good
REM pause
GoTo DetectIfAvgServiceIsRunnng
) else (
REM AVG UI Is NOT Working Correctly
REM Echo Bad
REM pause
GoTo BadAVG
)
Works if I run it manually after AVG is fully installed. But during the install process, it fails often.

Which is crazy. But I install AVG, then I tried waiting a full 5 minutes, just for testing, after AVG is installed and the UI is open on the screen to run the above and it fails 75% of the time. Yes it works a good 25%.

It's crazy. Any thoughts on how to do this differently (better).

I just can't think of any other way via script to really tell if AVG is working properly as even if in a bad state the AVG Service, avgui.exe, and avguix.exe are running.

I'd really prefer to not have to have the AVG UI open at all if possible. As mine final goal is to have this run silently.

This is the last thing that is needed before I can make it 100% silent.

Thanks for the assistance.

Much appreciated,

Will
Last edited by war59312 on 09 Feb 2017 14:10, edited 1 time in total.


war59312
Posts: 10
Joined: 07 Feb 2017 20:17
Location: U.S.A
Contact:

Re: How To Detect If AVG exe Really Runs (Solving An AVG Install Issue) ?

#3 Post by war59312 » 09 Feb 2017 14:17

Already using Remote Administration. Thank you any how.

It sucks! 99% of the time it fails to remove bad versions of AVG. Even their crappy AVG Remover fails.

I've solved that problem. My script fixes that problem.

My issue is just confirming that the install went successfully in the script I create.

I realize I can check later in the Remote Admin console.

I'm just trying to verify that the install went 100% during the script run.

For now I just assume it was successful if no errors were encountered during the install.

Works 99% of the time. I'm just trying to account for the 1% where it fails.

Sadly 1% for me is huge. Have 20,000 computers to fix. So 1% is still 200 computers.

I really don't want to have to try and manually first find the bad installs and then fix the said 200 computers. Again, at this point, the Remote Admin console and their own removal tools, installer, uninstall, etc. have already failed.

As I have no way currently to detect that failure accurately enough during the install. For now I account for known issues, like bad rights, cant find the installer (network share issue), etc. And I send myself an automatically generated email via powerscript. Works great.

So even if I cant automatically fix the issue during the install and least I'd know it failed on what computer as I log username logged into the computer, the computer name, computer IP Address assigned, date, time, etc.

So at least I'd then know about it and not spend time having to track down the fails. I'd have a nice list.

Thanks again for any help.

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: How To Detect If AVG exe Really Runs (Solving An AVG Install Issue) ?

#4 Post by Squashman » 09 Feb 2017 14:45

Your company paid for AVG, which means you have support. I would start with them.

war59312
Posts: 10
Joined: 07 Feb 2017 20:17
Location: U.S.A
Contact:

Re: How To Detect If AVG exe Really Runs (Solving An AVG Install Issue) ?

#5 Post by war59312 » 09 Feb 2017 15:12

I did, their "solution" was to fix each install by hand. By running their AVG Remover program.

Ha! Falls more often that in succeeds. Their tech support (support! - ha - as if) like most AV companies is useless.

So I'm figuring it out for them. Like I said I already figured most of it out.

There has to simply be a way to detect if it's really running or not. Their "solution" was to see what exe are running and to check if the service is running. I already do that. Still can be in bad state even with UI running in the background and service running.

And to check with the Admin console. Get this. Even the admin console will claim its working correctly, even when its not. Ugh!

I've simply given up on their so called tech support and am solving the problem myself.

We already know we are switching the moment the license expires.

Post Reply