AutomoxAutomox

worklet install help

curioustoknow
July 26, 2023 at 4:39 pm UTC
#Worklets#powershell

I am trying to make worklet to install 3 cisco products and only first one gets installed, I believe I am missing something on the remediation code to make all 3 install 

 

Evaluation Code

1 exit

 

Remediation Code

Start-Process msiexec.exe '/I cisco1.msi /quiet /norestart /passive'
Start-Process msiexec.exe '/I cisco2.msi /norestart /passive  '
Start-Process msiexec.exe '/I cisco3.msi /quiet /norestart /passive '

 

 

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (1)

AnthonyMJuly 26, 2023
#1

Good afternoon @curioustoknow !

 

Your issue is likely overlapping MSI installs - if you send Start-Process without the -Wait switch, the script will proceed and attempt all three installations in quick succession!

 

This should help:

powershell11 lines
$installers = ‘cisco1.msi’, ‘cisco2.msi’, ‘cisco3.msi’



foreach ( $installer in $installers )

{

    Start-Process -FilePath ‘msiexec.exe’ -ArgumentList ‘/i’, $installer, ‘/qn’, ‘/norestart’, ‘/passive’ -Wait

}

Let me know if you have any trouble.

 

- Anthony M.