I created a MSI package using wix installer where I used power shell to execute some commands. Normal command prompt not works because it prompt popup window on the middle of installation for user permission and confirmation
<SetProperty Id="InvokeTestPS1"
Before="InvokeTestPS1"
Sequence="execute"
Value =""[POWERSHELLEXE]" -Version 2.0 -NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command "& '[APPLICATIONROOTDIRECTORY]UpgradeupgradeMentor3_5.bat' ; exit $$($Error.Count)"" />
<CustomAction Id="InvokeTestPS1"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
Installer with the above code work sin most of our machines but in one machine installation rollsback and shown below error
"The version v2.0.50727 of the .NET Framework is not installed. This version is required to run version 2.0 of Windows PowerShell."
Our all machines are windows10 and powershell preinstalled, why in one of the machine it shows error.
Any input willbe a great help
question from:
https://stackoverflow.com/questions/65840122/powershell-not-working-while-in-wix-installer 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…