Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1036
  • Last Modified:

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?
0
adamshields
Asked:
adamshields
1 Solution
 
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
 
RobSampsonCommented:
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
 
adamshieldsAuthor Commented:
I believe using quotes when setting the variable was causing a problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now