Solved

batch file to install MSI

Posted on 2009-04-15
9
1,173 Views
Last Modified: 2013-11-14
Hi, I am trying to have an msi install at logon, but I keep getting the not recognized command error. Here is what my batch file looks like
REM batch File to push SysAidAgent
F:\Staging "msiexec /q /I SysAidAgent.msi SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952"

REM batch File to push SysAidAgent
"F:\Staging\msiexec /q /I SysAidAgent.msi SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952"

these are two variations I tried, and none of them worked
0
Comment
Question by:xzay1967
[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
  • 6
  • 3
9 Comments
 
LVL 2

Expert Comment

by:JSunn
ID: 24149685
Can you give an exact description of the error message you receive?
0
 
LVL 2

Expert Comment

by:JSunn
ID: 24149830
I would try reformatting your MSI command like this:

"msiexec.exe /i SysAidAgent.msi SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l <logfilelocation>"

Also, in your script, when you execute the msiexec command, is the current working directory where the SysAidAgent.msi is located? Also, I see you specified the /l option to log install progress, but I don't see a logfile location where the log should be stored. You should replace the <logfilelocation> above with wherever you want to store the installation logs.
0
 

Author Comment

by:xzay1967
ID: 24150445
Thank you JSunn.  The SysAidAgent is located in F:\Staging.
Would my script look like this?:
@echo off
Rem This pushes the sysaidagent to end users
"F:\Staging\msiexec.exe /i SysAidAgent.msi SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l F:\Staging\Sysaidlog"

0
Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

 
LVL 2

Expert Comment

by:JSunn
ID: 24150477
Since msiexec.exe is a file located in the system32 directory and not in F:\Staging, you command should look like this:
msiexec.exe /i "F:\Staging\SysAidAgent.msi" SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l "F:\Staging\Sysaidlog.log"

Note the locations of the quotes. I also added a .log to your logfile name
0
 
LVL 2

Expert Comment

by:JSunn
ID: 24150529
Additionally, this will only work if the drive F is already mapped. (I'm assuming its a network drive) I believe you can launch using a UNC share path as well like this:

msiexec.exe /i "\\servername\Staging\SysAidAgent.msi" SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l "F:\Staging\Sysaidlog.log"

Just make sure you've got the quotes setup properly.
0
 

Author Comment

by:xzay1967
ID: 24150629
Thanks again JSunn. This script is being called from another script that maps all the drives and the printers.
This is the script that makes the call:
REM this installs the SysAidAgent on users' computers
If exist "C:\program files\SysAid" goto End
Call F:\Staging\SysAidInstall.bat
goto end

Can I edit your option to look like this?:
msiexec.exe /i "F:\Staging\SysAidAgent.msi" SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l "F:\Staging\Sysaidlog.log"
0
 
LVL 2

Accepted Solution

by:
JSunn earned 500 total points
ID: 24150732
Yeah that looks good. You could do system specific installation logfiles by changing the logfile to look like this:
msiexec.exe /i "F:\Staging\SysAidAgent.msi" SERVERURL="http://jdrmediasvr:8080" ACCOUNT=free SERIAL=770CAFF1ABC62952 /q /l "F:\Staging\%COMPUTERNAME%_Sysaidlog.log"

That way if thee is an install error on one machine, you can easily find the associated logfile. Otherwise, everything else looks fine.
0
 

Author Closing Comment

by:xzay1967
ID: 31570526
Thank you , thank you. The script worked like a champ.
0
 
LVL 2

Expert Comment

by:JSunn
ID: 24150957
Glad to help man.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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