/build/static/layout/Breadcrumb_cap_w.png

MSI + MST script with WinBatch?

I'm preparing a CD for our offsite workers, and I don't think we've ever had to send one out before with an MSI+MST - I found one instance of an EXE + MST, though.

Can anyone help me with the correct syntax for this installation? We have to send it via WinBatch exe since we use the runas command - our users do not have administrative rights.

So far, I've gotten nowhere - I keep getting Windows Installer errors so the switch syntax I'm using is incorrect. What the command line would say is

msiexec /i "msifile.msi" TRANSFORMS="mstfile.mst" /qn

Thanks for any help!

0 Comments   [ + ] Show comments

Answers (11)

Posted by: joefoerster 11 years ago
Senior Yellow Belt
0

Here's what worked for me. 

The variables:
 
_Install3name = 'msiexec.exe'
_args3 = 'transforms="<pathto.mst>" /i "<pathto.msi>" /qn'
 
 
The install command:
 
_myReturn = RunShell("%_Install3name%", ' %_args3%', "", @HIDDEN, @GETEXITCODE)
 
The catch is, with a regular MSI, you can just run the MSI directly but for one with a transform, you have to run MSIEXEC directly and pass the transform and MSI paths as an argument. 

 

Posted by: madhatter 19 years ago
Senior Yellow Belt
0
The syntax looks right. I suggest putting the fully qualified path in your msifile and mstfile names. And if there are spaces in your path, be sure to enclose the whole path in quotes. Quite often folks forget to use quotes and msiexec interprets the space in the path as a parameter and errors out because msiexec doesn't understand the parameter that it thinks is being passed.
Posted by: angelia 19 years ago
Senior Yellow Belt
0
Sorry - the info I typed in the above post works great from command line. Trying to get it to run through a WinBatch, however, isn't happening.

I've tried several changes, but here's what throws me errors right now:

RunWithLogon("msiexec %PATHTOFIXES%\Adobe Reader 7.0.5.msi","/qn","", @NORMAL, @WAIT,runas_user, runas_domain, runas_pswd,0)

I can take out the /qn and leave "" and it still doesn't work. Plus, it's not even applying a transform at this point, and it needs to.

Here's a line I've tried w/the transform:
RunWithLogon("%Adobe7%\Adobe Reader 7.0.5.msi","/TRANSFORMS=%Adobe7%\Reader705.mst", "", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd, 0)

I've also tried appending the /qn after the line w/the TRANSFORMS before the quote is closed - nothing.
Posted by: artiahc_elay 19 years ago
Senior Yellow Belt
0
Hi angelia,

What is the error you getting? Are you using a password? Is your runas service enabled??
Posted by: angelia 19 years ago
Senior Yellow Belt
0
It's enabled. I'm using the admin password - it's not throwing a password error, it's telling me the parameters are incorrect. Any other runas command that I use (we do windows updates on this same script through runas as well, but they're exe files) work fine.

I just can't seem to get WinBatch and MSI+MST to work properly, and I'm sure it's the syntax. Problem is I've tried everything I can think of (I've tried lines other than the above, too, with varying error messages - this is the closest I've gotten).
Posted by: artiahc_elay 19 years ago
Senior Yellow Belt
0
Hi anglia,

Try this it should work

RunWithLogon("msiexec.exe", "TRANSFORMS=MyFile.mst /i C:\Install\MyFile.msi", "", @NORMAL, @NOWAIT,runas_user, runas_domain, runas_pswd,0)

The whole function RunWithLogon should be on one single line.
Posted by: artiahc_elay 19 years ago
Senior Yellow Belt
0
If you want to make it silent just use the /qn at the end

RunWithLogon("msiexec.exe", "TRANSFORMS=MyFile.mst /i C:\Install\MyFile.msi /qn", "", @NORMAL, @NOWAIT,runas_user, runas_domain, runas_pswd,0)

let me know if it worked
Posted by: angelia 19 years ago
Senior Yellow Belt
0
Got "invalid command line parameters" from msiexec. I'm going to try to repackage the msi with the mst and see if it'll run that way...
Posted by: angelia 19 years ago
Senior Yellow Belt
0
Yet another 1932: "Winexec Error: The parameter is incorrect"

RunWithLogon(runas_cmd,"","",@NORMAL,@WAIT, runas_user, runas_domain, runas_pswd,0)

runas_cmd = "msiexec /i C:\temp\Oct05\msifile.msi TRANSFORMS=c:\temp\Oct05\mstfile.mst /qn"


this is quite frustrating as you can imagine. I don't know what parameter it wants me to pass, but it seems to have issue with the first set of quotes being empty.
Posted by: artiahc_elay 19 years ago
Senior Yellow Belt
0
Your runas_cmd1 should contain just the name of the desired executable(msiexec.exe) not the whole thing, the first set of quotes you are talking abt should contain the parameters if required by the application.


runas_cmd1 = "msiexec.exe"

RunWithLogon(runas_cmd1, "TRANSFORMS=mstfile.mst /i C:\temp\Oct05\msifile.msi /qn", "", @NORMAL, @NOWAIT,runas_user, runas_domain, runas_pswd,0)


and what are using for runas_domain ?? "" or "." or domain name
Posted by: angelia 19 years ago
Senior Yellow Belt
0
Domain is "." - I'm getting an error "installation package can't be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package." - when I switch the command line around to have the /i msi and then the transforms it gives me the same thing...

RunWithLogon(runas_cmd1,"/i msifile.msi TRANSFORMS=mstfile.mst","",@NORMAL, @WAIT,runas_user, runas_domain, runas_pswd, 0)

runas_cmd1 is set to c:\windows\system2\msiexec.exe
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ