Solved

batch file to install MSI

Posted on 2009-04-15
9
1,163 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
  • 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
 
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now