Execute-MSI -WorkingDirectory

//Execute-MSI -WorkingDirectory
Execute-MSI -WorkingDirectory 2016-04-25T17:32:08+00:00

The Toolkit Forums General Execute-MSI -WorkingDirectory

  • Author
    Posts
  • Jacob
    Participant
    Post count: 7

    Hey, all.

    I’m a newcomer here and am trying to deploy multiple MSIs through the App Deployment Toolkit. I like to separate them under different folder names, but the toolkit has a difficult time finding the MSIs unless they’re directly under the Files directory.

    I’ve looked into the -WorkingDirectory option but I’m just not getting it.

    -WorkingDirectory <String>
    Overrides the working directory. The working directory is set to the location of the MSI file.

    The script appears to default under the Files folder, correct? Does that mean all I have to do is specify the folder where my MSI and MST are located, like so? -WorkingDirectory “AppFolder”

    Or do I have to specify the whole application path, something like -WorkingDirectory “$scriptDirectory\Files\AppFolder”?

  • Sue
    Participant
    Post count: 4

    All you need to do is call
    Execute-MSI -Action Install -Path ‘$dirFiles\yourdirectory1\yourmsi1’
    Execute-MSI -Action Install -Path ‘$dirFiles\yourdirectory2\yourmsi2’ -Transform ‘$dirFiles\yourdirectory2\yourmst2’

    $dirFiles is the variable for the Files directory in the toolkit.

    So on and so forth for each msi and mst and it should run fine.

    If you look in the AppDeployToolkitMain.ps1 as the global variables are declared in there.

  • Jacob
    Participant
    Post count: 7

    Okay, cool! One thing I’d suggest is that the action be written as:

    Execute-MSI -Action Install -Path $dirFiles\yourdirectory2\yourmsi2 -Transform $dirFiles\yourdirectory2\yourmst2
    (double quotes instead of single quotes as the single quotes will interpret the path as literal… I was reminded of this the hard way today)

    I’ll use this from now on! Thanks!!!

You must be logged in to reply to this topic.