Author Topic: avast! Free 6.0.1203 SILENT Installation  (Read 31037 times)

0 Members and 1 Guest are viewing this topic.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
avast! Free 6.0.1203 SILENT Installation
« on: July 05, 2011, 05:51:13 PM »
Hi guys, the latest version of avast! Free when installed silently with a batch file using the "/SILENT" or "/VERYSILENT" command, installs automatically Chrome. With the previous version of avast! there were no problems. I've also tried to add this REG key to prevent Chrome installation:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\No Chrome Offer Until]
"AVAST Software"=dword:01404cff

While this trick works with other softwares (for example CCleaner), with avast! it doesn't work.

Thank you!

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67275
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #1 on: July 05, 2011, 05:58:56 PM »
As far I remember, silent installation was a pro feature (at least on avast 4.8 ).
It was removed in later versions as far I know.
« Last Edit: July 07, 2011, 03:22:09 AM by Tech »
The best things in life are free.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #2 on: July 05, 2011, 08:49:12 PM »
thank you but as i wrote in my post the silent installation works, so this feature is active.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #3 on: July 07, 2011, 01:29:35 AM »
any idea??? This is the situation:

avast! Free 6.0.1125: "avast_setup.exe /VERYSILENT" -> avast! INSTALLED

avast! Free 6.0.1203: "avast_setup.exe /VERYSILENT" -> avast! INSTALLED & Chrome INSTALLED

How can i prevent Chrome installation???

Thank you!

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67275
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #4 on: July 07, 2011, 03:26:22 AM »
aedthuio, Vlk asked about silent installation...
http://forum.avast.com/index.php?topic=80315.msg661289#msg661289
And it was "updated" in the latest version (http://forum.avast.com/index.php?topic=81028.msg662581#msg662581).
Are you using it in a network?
The best things in life are free.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #5 on: July 07, 2011, 04:57:11 AM »
yes, i use it in a network, as always. I need a clean installation without Chrome.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67275
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #6 on: July 07, 2011, 05:11:41 AM »
yes, i use it in a network, as always.
I mean, is it being installed in a local network (group of computers)? At your home or your office?
The best things in life are free.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #7 on: July 07, 2011, 05:55:32 AM »
oh sorry! :D

a) it's not installed in a local network.
b) at home.

Offline aedthuio

  • Newbie
  • *
  • Posts: 7
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #8 on: July 11, 2011, 05:19:25 PM »
no solutions until now... i've mailed at Vlk but for now i've no received any reply.

Offline Vlk

  • Avast CEO
  • Serious Graphoman
  • *
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #9 on: July 11, 2011, 06:01:44 PM »
Well, what can I say, this is the expected behavior. The silent install is basically doing an installation with default options, and as Chrome is the defaut option, it gets installed...

And I'm not aware of any command-line option that would allow you to customize that behavior.


Thanks,
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline Aristophanes

  • Newbie
  • *
  • Posts: 4
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #10 on: July 23, 2011, 04:01:22 AM »
Hi guys,

I also have the same issue as aedthuio.  From Avast 6.0.1203 on, every silent install comes with a complimentary copy of Google Chrome that I didn't expect or want in an antivirus product.

Are there switches for overriding the install defaults on a silent install?  Surely Avast aren't expecting that customers will be happy to download an unsolicited browser as part of the cost of automating the install of their antivirus product?

I've used many antivirus products before settling on Avast as the best balance between functionality and non-obtrusiveness.  I really like the product so far, so hopefully this is just a glitch that can be ironed out.

Thanks.

Offline Aristophanes

  • Newbie
  • *
  • Posts: 4
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #11 on: July 23, 2011, 04:42:48 AM »
Hi guys,

After venting a little I had one last look for the holy grail and found that the command-line arguments for a silent install without Chrome had already been posted in the forum by lennit here http://forum.avast.com/index.php?topic=67584.0.

The command-line switches for a scripted install of Avast without Chrome are:

Avast_setup_free_or_pro_or_not  /VERYSILENT /NORESTART /SP-

I have tried this with Avast 6.0.1203 and it works fine.  Thanks to everyone for their help!

Offline Aristophanes

  • Newbie
  • *
  • Posts: 4
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #12 on: July 24, 2011, 06:56:58 AM »
Ok,

I might just be talking to myself but in case somebody does reference this thread sometime I must have had my rosetinted glasses on yesterday.  I thought that I was able to install Avast 6.0.1203 silently without Chrome using the switches /VERYSILENT /NORESTART /SP- but cannot repeat this today.  I'm going to put this down to wishful thinking.

Today I decided to put elegance aside and use a blunt instrument to install Avast 6.0.1203 silently without Chrome.  For those who haven't read the rest of this thread, versions of Chrome up to this build 6.0.1203 have by default installed silently (eg Avast_setup_free /silent) without Chrome.  From 6.0.1203, the setup is downloading and installing Chrome as part of a silent install.  Ok if you want it, not so ok if you don't want it.

The method I use to install Avast silently without downloading Chrome involves first spawning a script (as a separate process) that lurks in the background waiting for GoogleUpdate.exe to run, then kills it.  At the same time I run the Avast Setup using the Start /wait command so that when it returns to the calling script, Avast has finished installing and there are (hopefully) no timing issues for any installs you have scripted after this.

The script I call to kill GoogleUpdate.exe is called TP.bat and looks like...

@echo off
setlocal enabledelayedexpansion

:Initialise
set ExitOnEnd=
set OutputDevice=
set KillAutomatically=
set WaitToStart=
set TFile=
set TPTimeout=180
set TPCounter=%TPTimeout%
set TP_ProgressBar=

:CheckArgs
if %1. == . goto EndCheckArgs
set ThisArg=%1
if %ThisArg:~0,1%. == /. (
  if /i %ThisArg:~1,1%. == q.   (set OutputDevice=^>NUL)
  if /i %ThisArg:~1,1%. == f.   (set KillAutomatically=Y)
  if /i %ThisArg:~1,1%. == w.   (set TPCounter=0)
  if /i %ThisArg:~1,2%. == eX.   (set ExitOnEnd=Y)
) else (
  set TPTarget=%ThisArg%
)
shift
goto CheckArgs

:EndCheckArgs

:CheckParmsPassed
if not defined TPTarget (
  Tlist
  echo.
  set /p TPTarget=What is the name or process id of the task that you wish to terminate?
  if "!TPTarget!" == "" (
    echo No task specified!  Ending now.
    goto End
  )
)

:CreateTempFile
rem  Find an unused tempfile name and then create empty file.
set Tfile=%Temp%\TP%Random%.bat
if exist %Tfile% goto CreateTempFile
>%TFile% echo This is a temporary file created by %~nx0 and may be deleted.

:NextIteration
if "%TPCounter%" == "1"      (echo Waiting %TPTimeout%s for %TPTarget% to start, so me can kill it^^!)
set /a TPCounter=%TPCounter% + 1
set TP_ProgressBar=%TP_ProgressBar%.
if %TPCounter% GTR 1   (
  if %TPCounter% LSS %TPTimeout%   (
    echo %TPCounter%%TP_ProgressBar%
  )
)
Tlist | find /i "%TPTarget%" | find /v /i "cmd" >%TFile%
for /f "tokens=1,2,3" %%c in (%TFile%) do (
  if defined KillAutomatically (
    %OutputDevice% TaskKill /F /PID %%c
  ) else (
    Choice /c:NY /n /t:N,30 "Kill process %%c (%%d, %%e)? [Y/N] "
    if Errorlevel 2 (%OutputDevice% TaskKill /F /PID %%c)
  )
  set TPCounter=%TPTimeout%
)
>NUL Timeout 1
if %TPCounter% LSS %TPTimeout% goto NextIteration
rem %OutputDevice% echo Timed out waiting for %TPTarget%, or not instructed to wait.

:End
if defined TFile   (erase %TFile%)
if defined ExitOnEnd    (exit)
endlocal


The script lines that I use to do the whole install look like...

call TP.bat /exit /waittostart /force GoogleUpdate.bat
Start /wait Avast_setup_free /silent /noreboot
Start /wait Next_app /silent


Tp.bat will run first and wait for GoogleUpdate.exe to start.  This is usually about a minute into the Avast Setup, at which point TP.bat will kill GoogleUpdate.exe and exit.
The start /wait prefixing the setup file are not necessary in a batch file but I put them in so that you can try this at the command prompt without scratching your head wondering why the behaviour is different.

As I've said the solution is not elegant.  I would prefer to prevent GoogleUpdate.exe from running through command-line switches but cannot find any that work with this install.  The TP.bat script will kill any instances of GoogleUpdate.exe that are already running or start during the Avast install (say about a 60s period on a Pentium 2.6GHZ).  If you have other Google products installed that use GoogleUpdate.exe, this might not be a good solution for you.

Hope it helps for anybody needing to automate this setup without installing Chrome.

Offline FreeFry

  • Newbie
  • *
  • Posts: 5
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #13 on: April 15, 2012, 02:51:55 PM »
Alright, I'll start of saying that on previous installs I've done of the free version of Avast I've ran it with the /silent switch and let it install Chrome and then uninstalled it afterwards(or just left it, depending on user preferences).
However, today I decided to remedy the problem.

I started by reading up on the web for known switches/solutions to the problem, but all I could find was to either let Chrome install then uninstall it, OR kill the Chrome installer when it launches and delete any files it created - none of which in my opinion is a really proper solution.

Therefore I decided to come up with a better solution (in my opinion at least), and I started by looking at how the installer handles the install (what switches, files, etc. it was using).
My main method was to analyze the installer using Process Explorer, Process Monitor, and to some minor extent IDA Pro and Olly Debug - the last two to examine what switches where handled by the executables.

Using Process Explorer, I could clearly see that the installer was executing an otherwise non-executable file(due to it missing the .exe file extension) called avast.setup, I confirmed what it was doing using Process Monitor, which also showed me that the installer was extracting some files (including the avast.setup file) to a temporary directory (located inside %temp%).

I then had a look at the switches the "Main" installer was launching the "Real" installer (avast.setup) with, and found it was using these switches:
Code: [Select]
/sfx /sfxstorage "<temp directory>" /GetEdition:free /brandcode "A"  /srcpath "<directory of Main installer>" /sfxname "<name of Main installer>"
<temp directory> refers to the directory the "Main" installer extracted files to (in my case %temp%\_av_sfx.tm~<random numbers>).
<directory of Main installer> refers to the directory where the Main installer was located.
<name of Main installer> refers to the filename of the "Main" installer ( in my case avast_free_antivirus_setup)
I then proceeded with copying the files the installer extracted to a place for studying them in peace sorta speak. (at this point I canceled the install since I was going to redo it without Chrome being part of the install).

Do note, that if the install is canceled, the temporary directory is deleted, so be sure to copy the files before closing the installer!

Looking at the files inside the copied directory, I found a lot of vpx files, along with some binaries, such as dlls, and two executables:
GToolbar_AVS.exe and
Chrome_AVS.exe

I guessed these two were responsible for both the Toolbar and Chrome installation(which happens by default in silent mode), so I renamed them (one could just remove them as well, but I kept them).

I also had a look at the avast.setup file, and (based on previous experience with installers (and even a few games) I know that an executable file does NOT need the .exe file extension to in fact be executable, so I tried adding .exe to its name, giving me avast.setup.exe.

Then I tried running the newly renamed file as it was, and somewhat expectedly this gave me an error window from the installer, no dice.
I decided to try and run it with the switches the default installer ran it with, and it gave me more errors, again no dice.

I then had a closer look at the switches, and noticed that two switches stood out, namely /sfxstorage and /srcpath.
Since I had copied the files the "Main" installer extracted, the path to said files obviously had changed, so I rewrote the switches so they pointed to the new path of the files.
Running it again with correct file paths fixed the issue and the installer popped right back up as if run from the "Main" installer (it was still showing the option of installing Chrome and its Toolbar).

I canceled the install yet again, and added the /silent switch to the mix, and after a few minutes I had Avast installed, WITHOUT Chrome!

Success at last.

To sum it up, what I did was to look in the %temp% directory for files copied by the installer, then backing these files up to a new folder, then renaming/removing the Chrome related executables, and renamed the "hidden" installer executable from avast.setup to avast.setup.exe, changed the switches to point to the folder where the backed up files now resided and added the /silent switch.

The full command line became:
Code: [Select]
C:\Avast\Setup\avast.setup.EXE /sfx /sfxstorage "C:\Avast\Setup" /GetEdition:free /brandcode "A"  /srcpath "C:\Avast" /sfxname "avast_free_antivirus_setup" /silent
Note:
Even though some of the switches point to the directory of the "Main" installer executable, and the name of the executable, it does seem the "Main" installer executable is NOT needed, only the extracted files are.
I have not thoroughly tested this to see that no complications arise from it, but it definitely seems to work.

All this was done on a networked virtual machine running a freshly installed domain joined PC with Windows 7 Ultimate 64-bit through Remote Desktop.

I hope this will help somebody out there!

Offline Muad'Dib

  • Jr. Member
  • **
  • Posts: 68
    • The underwater sound of the Antarctic Ocean
Re: avast! Free 6.0.1203 SILENT Installation
« Reply #14 on: April 15, 2012, 06:58:03 PM »
FreeFry,

Just to clarify, is most of your post simply explaining the steps you took to figure things out, and your last command line works as-is (without installing the toolbar or Chrome)?

Or do you need to change some of the settings (as mentioned in your post) before you attempt the final command line?

Just trying to make sure I (and others) understand exactly what needs to be done.

Thanks!
« Last Edit: April 15, 2012, 08:09:35 PM by Muad'Dib »