Reputation: 93
I am new to power shell, I want to install .msi for this we are using below command,
Start-Process msiexec.exe -Wait -ArgumentList 'C:\Users\abc.xuz\Downloads\Firefox Setup 14.0.1.msi'
However this is giving me an error. Along with this it should automatically accept next button. Please help me for the same.
Upvotes: 1
Views: 25576
Reputation: 93
I have tried this and it worked:
Start-Process msiexec.exe -Wait -ArgumentList '/i
"C:\Users\abc.xuz\Downloads\Firefox Setup 14.0.1.msi" /q /le
"C:\Users\abc.xuz\Downloads\Firefox.log"'
Upvotes: 3
Reputation: 552
With below instruction, you can download MSI installer and print its version
git-bash command
curl -O https://download.microsoft.com/download/a/a/c/aacb9da7-b103-4bec-99ab-cfaf28b0ba78/x64/DacFramework.msi
power-shell command
Start-Process msiexec.exe -Wait -ArgumentList '/i "D:\a\r1\a\DacFramework.msi" /q /le "D:\a\r1\a\DacFramework.log"'
git-bash command set
echo "change directory to DAC bin"
cd "/c/Program Files/Microsoft SQL Server/150/DAC/bin"
echo "print present working directory"
pwd
echo "ls SqlPackage.exe"
ls SqlPackage.exe
echo "sql package version"
./SqlPackage.exe -version
output is as below
15.0.5164.1
Upvotes: 0
Reputation: 1415
This might help Silent installation of a MSI package
If you planning to automate the installtion then why don't you consider using chocolatey. Its a far better way than writting your own custom script.
It also provides option for installation/uninstall, specific version of package etc.
Steps to use chocolatey
choco install firefox
to install it. Find more details here Upvotes: 0