Jump to content

Installing MSI programs and passing arguments help


Go to solution Solved by TXTechie,

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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")

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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

Link to comment
Share on other sites

  • Moderators

@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)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Solution

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
Link to comment
Share on other sites

  • Moderators

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)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...