Providing execute-msi or execute-process with variables as parameters even if some are missing

Topics: Archive - General
Jan 27, 2015 at 8:51 PM

Execute-MSI -Action Uninstall -Path "$Itemvar_UnSetup_Parameter"`
                                                    -LogName "$var_PackageLongName"
Execute-MSI -Action Install -Path "$Var_SourceFiles\$($Itemvar_Setup_Parameter[0])" -transform $Itemvar_Setup_Parameter[1] `
                                                -Parameters $Itemvar_Setup_Parameter[2]`
                                                -LogName "$var_PackageLongName"
As you know Execute-MSI and Execute-Process have many parameters. Most of them are facultatives. I would like filling a separate file with the parameter's values and then just use those variables with Execute-MSI or Execute-Process.

As I understand if some parameters are missing, I just can't let these parameters blank and some parameters don't have a default value.

How may I use a single line working even if some parameters are missing?

I don't know if I am clear enough with my explanations... may be in french it would be better :)

Jan 28, 2015 at 8:07 PM
The separate file already exists as AppDeployToolkitConfig.xml.
The default MSI settings are listed under <MSI_Options>

Otherwise, you'll have to set and use $YourOwnVariables in Deploy-Application.ps1

FYI: Facultatif => Default.

Et ton Englais est bon en masse.