I just wanted to share an example of getting creative with installs. This software will require a user prompt to install the certificates, but if they are already installed, you can install it silently. So I installed the software on a workstation manually and exported the certs. I added them to the policy package and use powershell to install the certs before installing the software.
#REQUIRES -Version 2.0
<#
.SYNOPSIS
This script allows an admin to install Arduino IDE.
.DESCRIPTION
#>
#Handle Exit codes:
trap { $host.ui.WriteErrorLine($_.Exception); exit 90 }
function Arduino{
#############Change the settings in this block#######################
#####################################################################
Try {
certutil -addstore TrustedPublisher ArdruinoLLC.cer
certutil -addstore TrustedPublisher ArdruinoSRL.cer
certutil -addstore TrustedPublisher adafruit.cer
Start-Process -FilePath "arduino-1.8.16-windows.exe" -ArgumentList "/S" -Wait
exit 0
}
Catch {
exit 1
}
}
Arduino