Skip to main content
Solved

Installing msi package using required software

  • February 28, 2024
  • 3 replies
  • 226 views

Forum|alt.badge.img

Hello everyone. I have been trying to find some examples, and I thought what I put would work, but its not. I am trying to install an msi package that has some extra arguments. For example, If I run this from a command line it works on a computer:

 

msiexec /i agentmanagersetup.msi /qn DEVREGCODE=XXXX TENANT=XXXX ALLUSERS=1

 

When using automox it has me do some of this in quotes and parentheses and this is where I am not sure what to do. I currently have this but its not working:

 

exit (Start-Process -FilePath 'msiexec.exe' -ArgumentList ('/qn', '/i', '"agentmanagersetup.msi DEVREGCODE=XXXX TENANT=XXXX ALLUSERS=1"') -Wait -Passthru).ExitCode

If I removed the DEVREGCODE and TENANT arguments and put them in their own quotes i would get an error about a token. If i put it the way I have it above, it doesnt seem like its running as i dont even see a failed in the activity report.

Not sure What I am doing wrong. Also, because the install has specific to our company, I replaced that data with the X’s.

Best answer by jack.smith

Give this a try.

$install = Start-Process -FilePath msiexec.exe -ArgumentList ('/i agentmanagersetup.msi DEVREGCODE=XXXX TENANT=XXXX ALLUSERS=1 /qn') -Wait -Passthru
Write-Output "Install ExitCode: $($install.ExitCode)"

 

 

View original
How helpful was this post to you?

3 replies

jack.smith
Forum|alt.badge.img+1
  • All Star
  • 168 replies
  • Answer
  • March 1, 2024

Give this a try.

$install = Start-Process -FilePath msiexec.exe -ArgumentList ('/i agentmanagersetup.msi DEVREGCODE=XXXX TENANT=XXXX ALLUSERS=1 /qn') -Wait -Passthru
Write-Output "Install ExitCode: $($install.ExitCode)"

 

 


Forum|alt.badge.img
  • Author
  • Novice
  • 7 replies
  • March 1, 2024

Thank you. I will give this a try.


Forum|alt.badge.img
  • Author
  • Novice
  • 7 replies
  • March 4, 2024

That worked, thank you very much.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings