I am trying to put together a powershell script to download firefox msi from sharefile and silently install.
I finally got the download part to work. However, installing does not. When I navigate to the folders where I downloaded firefox msi to (C:\, C:\users\public, and my desktop) I get the following errors:
This app can't run on your PC
This installation package could not be opened. Contact the application vendor to verify this is a valid windows installer package.
I downloaded the exe from mozilla site and msi from front motion.
The share the software is in is open to everyone on network.
I get same errors for both exe and msi.
This is my current script:
#Download and Run MSI package for Automated install
$uri = "https://sharefile.com/app/#/home/shared/foe0295b-0fbf-4ad9-ad73-fc18d26ba705/FirefoxInstaller.msi"
$out = "c:\FireFoxInstaller.msi"
Invoke-WebRequest -uri $uri -OutFile $out
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $out /quiet /norestart /l c:\installlog.txt"
To grab the latest version of Firefox, try the following (replacing the Outfile to your own valid location);
Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-GB" -Outfile c:\temp\firefox.msi
To install, I use;
start /wait msiexec /i C:\temp\Firefox.msi /quiet