Sign in to follow this  
Followers 0
dachammer

Installing MSI programs and passing arguments help

12 posts in this topic

#1 ·  Posted (edited)

Hi, I find myself in need of a simple script to pass arguments to a msi installation.   This is what I came up with for the code.  What I'm looking for is a way that the $args line will be read by the msi.  Thanks in advance for any help on this one.....

$Inst = @ScriptDir & "KeyViewComponent1080.msi"
$args = "/qb /l*v C:sccmmsi_logsKeyViewComponent1080.log"
 
ShellExecuteWait($Inst,$args, @ScriptDir)

 

This works but I need to pass more arguments....

$Inst = @ScriptDir & "KeyViewComponent1080.msi"
$args = "/qb"
 
ShellExecuteWait($Inst,$args, @ScriptDir)

Edited by dachammer

Share this post


Link to post
Share on other sites



I'm not sure what you mean by "need to pass more arguments". You should be able to do this:

ShellExecute("msiexec.exe", @ScriptDir & "KeyViewComponent1080.msi /qb /l*v C:sccmmsi_logsKeyViewComponent1080.log")


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

That comes up with the msi installer options box.  Meaning it's not reading the args correctly....

Windows ® Installer. V 5.0.7601.17514

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options
 </package | /i> <Product.msi>
  Installs or configures a product

Share this post


Link to post
Share on other sites

Is it case sensitive?  You can test by changing your lower case l to an uppercase L.

Msiexec (command-line options) shows the command as "/L*v", I don't know if this is why you are getting the syntax error, but I suppose it is possible.

Share this post


Link to post
Share on other sites

@dachammer - Try this to confirm that the output looks the way you would like it:

$var = @ScriptDir & "\KeyViewComponent1080.msi /qb /l*v C:\sccm\msi_logs\KeyViewComponent1080.log"
    ConsoleWrite($var & @CRLF)

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

dachammer,

You need to include the /i switch before you provide the MSI folderpath, like this:

ShellExecute("msiexec.exe", "/i " & @ScriptDir & "\KeyViewComponent1080.msi /qb /l*v C:\sccm\msi_logs\KeyViewComponent1080.log")

You might even need to include quotes around your MSI folderpath if there are spaces in the folder path.

Edited by TXTechie

Share this post


Link to post
Share on other sites

good lord, can't believe I missed that. Nice catch TXTechie. :>


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

good lord, can't believe I missed that. Nice catch TXTechie. :>

LOL, is there room on that boat? I was even on the damn technet page...

Share this post


Link to post
Share on other sites

Still coming up with msi installer parameters box.  Syntax is incorrect....


  1. $var = @ScriptDir & "KeyViewComponent1080.msi /qb /l*v C:sccmmsi_logsKeyViewComponent1080.log"
  2.     ConsoleWrite($var & @CRLF)

Where do I read the output of this file at?

 

Share this post


Link to post
Share on other sites

You would see it in the bottom portion of the console if you have the full AutoIt install and are using SciTe. If not, try this instead:

MsgBox(4096, "", $var)

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

And make sure you read TXTechie's post which is likely the issue

dachammer,

You need to include the /i switch before you provide the MSI folderpath, like this:

ShellExecute("msiexec.exe", "/i " & @ScriptDir & "\KeyViewComponent1080.msi /qb /l*v C:\sccm\msi_logs\KeyViewComponent1080.log")

You might even need to include quotes around your MSI folderpath if there are spaces in the folder path.

Edited by danwilli

Share this post


Link to post
Share on other sites
JLogan3o13 & danwilli,
 
It was one of those too obvious to even notice things. I had to check one of my MSI install scripts and compare the entire command-line in order to see it.  :rolleyes:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0