I have a signed PowerShell script that I want to deploy to the target machine through the WiX installer. Is it possible to provide script execution rights?
Regards, Forki
<Property Id="POWERSHELLEXE"><![CDATA[C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe]]></Property> <CustomAction Id="AllowPS" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command Set-ExecutionPolicy RemoteSigned" Execute="deferred" Return="check"/> <InstallExecuteSequence> .. <Custom Action="AllowPS" Before="InstallFinalize"/> ... </InstallExecuteSequence>
Group Policy is the best way to do this,
, , PowerShell.exe , , . -Force .
PowerShell 2.0, PowerShell.exe -ExecutionPolicy. - script.
ExeCommand="-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -File <scrptpath>"
I set ExecutionPolicy using group policies.
Source: https://habr.com/ru/post/1735559/More articles:Filtering a list of objects using LINQ - listะะต ัะดะฐะตััั ัะฐะทัะตัะธัั NameValueCollection ั ะฟะพะผะพััั Autofac - c#Track animation on CALayer with a mask - objective-cQProcess does not start Java application under windows 7 - c ++How do I name a native DLL, distributed in both 32-bit and 64-bit form? - dllRun the function immediately after loading the view, iphone - iphonehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1735561/how-do-i-get-the-upper-and-lower-limits-to-the-global-data-area-in-c&usg=ALkJrhi4UdGK8fTxNQj2xK5JTYYi4d_7KAThe state of the listView element in the DrawItem event is incorrect - c #How to implement or imitate the "abstract" class OCUnit? - objective-cRails routes - show action as root - ruby-on-railsAll Articles