DosTips.com

A Forum all about DOS Batch
It is currently 19 Oct 2017 10:17

All times are UTC-06:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 09 Feb 2017 12:51 
Offline

Joined: 07 Feb 2017 20:17
Posts: 10
Location: U.S.A
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.

Top
   
PostPosted: 09 Feb 2017 14:09 
Offline
Expert

Joined: 23 Dec 2011 13:59
Posts: 3590
http://www.avg.com/us-en/remote-administration
https://support.avg.com/SupportArticleV ... ss-Edition


Top
   
PostPosted: 09 Feb 2017 14:17 
Offline

Joined: 07 Feb 2017 20:17
Posts: 10
Location: U.S.A
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.


Top
   
PostPosted: 09 Feb 2017 14:45 
Offline
Expert

Joined: 23 Dec 2011 13:59
Posts: 3590
Your company paid for AVG, which means you have support. I would start with them.


Top
   
PostPosted: 09 Feb 2017 15:12 
Offline

Joined: 07 Feb 2017 20:17
Posts: 10
Location: U.S.A
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], thefeduke, Yahoo [Bot] and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited