-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 15.0.0
-
None
When calling Install.install function from the install.lua component, the operation fails even though the file is correctly downloaded and contains a valid zip file.
The error results from the PowerShell command:
C:/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -command Expand-Archive -Force '%{src}' '%{dest}'
It says:
Expand-Archive : The 'Expand-Archive' command was found in the module 'Pscx', but the module could not be loaded. For more information, run 'Import-Module Pscx'.
Calling Import-Module Pscx results in another error:
Import-Module : File W:\<user>\Documents\WindowsPowerShell\Modules\Pscx\3.3.2\Pscx.psm1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/f wlink/?LinkID=135170
The same issue occurs when running the command directly from the PowerShell.
It can be fixed by adding -ExecutionPolicy Bypass to the initial Power Shell command:
C:/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -command Expand-Archive -Force '%{src}' '%{dest}'
Note: I use a self-compiled QtCreator from the 15.0 branch (commit: 3b09ecbfa27948494f14ba0ace32e23919d793a1).