Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
186 views
in Technique[技术] by (71.8m points)

.net - Powershell not working while in WIx installer

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 ="&quot;[POWERSHELLEXE]&quot; -Version 2.0 -NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command &quot;&amp; '[APPLICATIONROOTDIRECTORY]UpgradeupgradeMentor3_5.bat' ; exit $$($Error.Count)&quot;" />
<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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...