Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install .MSI using PowerShell

Tags:

I am very new to PowerShell and have some difficulty with understanding.
I want to install an .MSI inside PowerShell script.
Can please explain me how to do that or provide me beginners level tutorial.

$wiObject = New-Object -ComObject WindowsInstaller.Installer ????? 
like image 575
New Developer Avatar asked Jul 24 '13 05:07

New Developer


People also ask

How do I get the MSI product code for PowerShell?

You can retrieve the MSI installed packaged product code on the windows OS using PowerShell with Get-Package or Get-WmiObject command.


1 Answers

Why get so fancy about it? Just invoke the .msi file:

& <path>\filename.msi 

or

Start-Process <path>\filename.msi 

Edit: Full list of Start-Process parameters

https://ss64.com/ps/start-process.html

like image 83
Adi Inbar Avatar answered Sep 18 '22 03:09

Adi Inbar