Install Avast using a .bat as a logon script

Install Avast using a .bat as a logon script


1) Copy the text below and save as a .bat file.

2) Change the file location to reflect the location and name of the install file on your network. (\\server\install\avast_business_antivirus_setup.exe) 

3) If you are not familiar with how to use a logon script with your domain, search the Microsoft web site for your domain controllers OS and how to use logon scripts.



The script below checks for the file bccinfo.dat and if it exist will abort the installation to prevent a reinstall each time the device logs on the network.



IF EXIST "c:\programdata\Avast Software\avast\bccinfo.dat" GOTO END



if exist %SystemRoot%\SysWOW64 goto 64-bit


echo "Avast Business Install" >

goto END




echo "Avast Business Install" >




Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


  • 0
    Олег Гурьев

    Unfoturnatly this method doesn't work in my configuration.
    If user is not admin - installation won't run.
    I've got different solution, using VBS:
    ----------Code Start--------
    On Error resume next
    set WSHShell = CreateObject("WScript.Shell")
    set objNetwork = CreateObject("")
    set objSysInfo = CreateObject("ADSystemInfo")

    DISTRD = "\srv-001\software$\" 'Path to Installer
    DISTR = "avast_business_antivirus_setup.exe" 'Installer's name
    REGCHK = "HKLM\SOFTWARE\ScriptInstall\Avast" 'Reg key to check previous install

    strCHK = WSHShell.regRead(REGCHK)

    If trim(StrCHK) = "" Then
    WSHShell.RegWrite REGCHK, "Installed", "REG_SZ"
    end if

    RUNSTR = CHR(34) & DISTRD & DISTR & CHR(34)
    ------Code end----------
    I use this script in GPO. Section Computer Configuration/Windows Settings/Scripts/Startup

    Maybe it will be useful for someone.

  • 0
    Jose Avila

    It doesn't matter if the user is admin or not because the script will run before log on. That's why you must put the script in Computer startup scripts and not User log on scripts.

Please sign in to leave a comment.
Powered by Zendesk