Affinity is basically the free alternative of Adobe Photoshop, Illustrator and InDesign all in one software.
After not being able to install my CS6 Illustrator any more, i had to find an alternative and figured i might as well automate the installer 🙂
First of all, you will need to register at https://affinity.studio/ to grab the download from (may or may not work without registering, i have not tried it):
https://downloads.affinity.studio/Affinity%20x64.exe
Then to get a prompt to create the .msi for automatic installation run:
& ",\Affinity x64.exe" /defaults
And upload the final Affinity.msi to your RMM software of choice.
Modify my current code below or use as-is (this will probably not grab the latest version of the Affinity software as im unsure how often i will do the above procedure):
$ProgressPreference = 'SilentlyContinue'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$tp = "C:\TempPath"
mkdir $tp -EA SilentlyContinue
$Installer = "Affinity.msi"
$Url1 = "https://cdn.mspot.se/files/Affinity/Affinity.msi"
Invoke-WebRequest -Uri $Url1 -OutFile $tp\$Installer
Start-Process msiexec.exe -Wait -ArgumentList "/norestart /i $tp\$Installer /qn"
Start-Sleep -Seconds 30
del $tp\$Installer