Batch Scripting McAfee antivirus install

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?
LVL 3
adamshieldsAsked:
Who is Participating?
 
RobSampsonConnect With a Mentor Commented:
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
 
jhill777Commented:
Are you on a domain?  I would suggest using group policies to to install .msi packages.
0
 
Bryan ButlerCommented:
What is the specific error message?  Also, if you remove the "@echo off" you will know the line that's giving the error.
0
 
adamshieldsAuthor Commented:
I believe using quotes when setting the variable was causing a problem.
0
All Courses

From novice to tech pro — start learning today.