Jump to content
DeployCentral

Antivirus install via tasks/batch file


eturner
 Share

Recommended Posts

Has anyone run into issues installing Antivirus via tasks in an answer file? Trying to install AVG Business 2013 from a batch file that is in my image. The batch runs installation fine when I double click on it as will as run it from a command prompt from the desktop, but doesn't seem to want to install via the task command that I have given it in smartdeploy. Everything that I need to run the batch, including the batch, is in the root of C:\

Here's the section of the answer file where I tell it to run the batch:

<task>
  <phase>FIRSTBOOT</phase>
  <command>cmd.exe /c c:\AvgSetup.bat</command>
</task>

Here's the batch:

@ECHO OFF
REM AVG Setup Batch
IF NOT DEFINED PROCESSOR_ARCHITEW6432 (
IF %PROCESSOR_ARCHITECTURE% EQU x86 (
SET SETUP="C:\avg_ipw_x86_all_2013_3553a11388.exe"
) ELSE (
SET SETUP="C:\avg_ipw_x64_all_2013_3553a11388.exe"
)) ELSE (
SET SETUP="C:\avg_ipw_x64_all_2013_3553a11388.exe"
)
IF NOT EXIST %SETUP% GOTO NoSetup

REM Start AVG Setup
%SETUP% /ConfigFilePath="C:\AvgSetup.ini" %1 %2 %3 %4 %5 %6 %7 %8 %9

if %ERRORLEVEL% EQU 1 goto AvgErr
goto End

:AvgErr
ECHO Error while installing AVG
goto End

:WrongPlatform
ECHO Installation file does not support this OS platform(x86 vs x64)
goto End

:NoSetup
ECHO Missing installation files

REM Continue batch processing
:End
ECHO setup returned %ERRORLEVEL%

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...