Solved

Batch Scripting McAfee antivirus install

Posted on 2010-09-21
4
1,028 Views
Last Modified: 2012-06-21
I have a packaged McAfee install that I can install using the following:

C:\Documents and Settings\User\Desktop\Patches>VSE87wP3.EXE /q

Open in new window


I would like to place this in a batch script but when I run it prompt with an invalid syntax
@echo off 
set CD="%userprofile%\Desktop\Patches"
cmd /c "%CD%\VSE87wP3.EXE /Q"

Open in new window


I have also tried the following which installs but again the script does not.
C:\Documents and Settings\User\Desktop\Patches\VSE87wP3>msiexec /i vse870.msi /qn

Open in new window


@echo off 
set CD="%userprofile%\Desktop\Patches"
msiexec /i "%CD%\VSE87wP3\SetupVSE.msi /qn"

Open in new window


Any tips on getting this package installed?
0
Comment
Question by:adamshields
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:jhill777
ID: 33728061
Are you on a domain?  I would suggest using group policies to to install .msi packages.
0
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 33728878
What is the specific error message?  Also, if you remove the "@echo off" you will know the line that's giving the error.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 33730483
Hi, have you tried just this in your batch file
"%userprofile%\Desktop\Patches\VSE87wP3.EXE" /q

or
msiexec /i /qn "%userprofile%\Desktop\Patches\VSE87wP3\vse870.msi"

Regards,

Rob.
0
 
LVL 3

Author Closing Comment

by:adamshields
ID: 33731077
I believe using quotes when setting the variable was causing a problem.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question