1

I'm having problems to create an unattended installation of cmdlets of Azure (It's a msi file, windowsazure-powershell.0.8.3.msi, current version).

How can I know the parameters that installation needs and how I should write it?

In this way?

$msifile= '<path>\windowsazure-powershell.0.8.3.msi' 
$arguments= ' /qn /l*v .\options.txt' 
Start-Process `
 -file  $msifile `
 -arg $arguments `
 -passthru | wait-process

So how can I perform that?

Thanks in advance.

ITPro Guy
  • 187
  • 1
  • 14

1 Answers1

1

Don't worry about all the commandline switches. You can do this using WMI and PowerShell

$product= [WMICLASS]"\\.\ROOT\CIMV2:win32_Product"
$product.Install("c:\temp\windowsazure-powershell.0.8.3.msi")
ravikanth
  • 24,922
  • 4
  • 60
  • 60
  • Ravikanth, thank you very much for your answer but I have a question related with your reply. What vmi class should I use to install this without take care about parameters? I looked up for this but I didn't get something useful for this case. Thank you again. – ITPro Guy Jun 02 '14 at 13:20
  • The WMI class that helps with MSI installs is Win32_Product. You can simply run the code I provided. A return code 0 means that the MSI install was successful. No other parameters needed. – ravikanth Jun 02 '14 at 15:56