raspberrypi / pico-setup-windows

Old Pico-Setup-Windows installer, this repository is no longer in use.
Apache License 2.0
259 stars 38 forks source link

Installer not checking PowerShell execution policy #27

Closed wattyka closed 9 months ago

wattyka commented 1 year ago

The "Pico - Visual Studio Code" start menu link seemed to do nothing on my Win 10 machine. Turns out that the execution of .ps1 scripts was prohibited by the default PS execution policy. "set-executionpolicy unrestricted" fixed this for me. I'm a little confused why nobody else seems to run into this problem (I personally never used Powershell so far).

The setup should probably check the active execution policy for power shell scripts and make some suggestions.

ndabas commented 1 year ago

We don't need to check the ExecutionPolicy because we bypass it in the command line that's used to launch the PowerShell scripts. The shortcuts have a command line like this:

powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "..."

This has been extensively tested on systems with the default execution policy and it works fine.

Are you sure you didn't do anything else, like change/install VS Code? Like your other issue (#26 )?

ndabas commented 9 months ago

Closing because no further action is needed/haven't heard from the issue author.