Open kosmosterrl opened 1 year ago
I had the same problem on Win10. Rather than set an execution policy, I unblocked the specific file.
In Visual Studio Code: Terminal -> New Terminal (Opens a PowerShell prompt at the current project location)
Run Unblock-File '.\Build and Run (Simulator).ps1'
I had the same problem on Win10. Rather than set an execution policy, I unblocked the specific file.
In Visual Studio Code: Terminal -> New Terminal (Opens a PowerShell prompt at the current project location)
Run
Unblock-File '.\Build and Run (Simulator).ps1'
This should be the recommended method in the readme for allowing vscode to execute the script, changing the entire execution policy for one script is quite excessive and could lead to being exploited by malware
I had the same problem on Win10. Rather than set an execution policy, I unblocked the specific file.
In Visual Studio Code: Terminal -> New Terminal (Opens a PowerShell prompt at the current project location)
Run
Unblock-File '.\Build and Run (Simulator).ps1'
This should be the recommended method in the readme for allowing vscode to execute the script, changing the entire execution policy for one script is quite excessive and could lead to being exploited by malware
As far as I know unblocking .ps1 file is not the same as running it with admin rights. Both should be done to run it successfully. In the readme there is a code that lets this script be executed without need to launch VS Code as admin (recommend via pull request). There's a nasty bug in VS Code if it's launched with admin rights: https://github.com/microsoft/vscode/issues/91613
I had the same problem on Win10. Rather than set an execution policy, I unblocked the specific file. In Visual Studio Code: Terminal -> New Terminal (Opens a PowerShell prompt at the current project location) Run
Unblock-File '.\Build and Run (Simulator).ps1'
This should be the recommended method in the readme for allowing vscode to execute the script, changing the entire execution policy for one script is quite excessive and could lead to being exploited by malware
As far as I know unblocking .ps1 file is not the same as running it with admin rights. Both should be done to run it successfully. In the readme there is a code that lets this script be executed without need to launch VS Code as admin (recommend via pull request). There's a nasty bug in VS Code if it's launched with admin rights: microsoft/vscode#91613
Yes this is correct actually, I spoke too soon, RemoteSigned should be safe enough as it's the default setting for Windows Server Installations
As for OP, the greyed out Read Only / Hidden / System properties is very odd.
Upon further inspection it looks like they're examining the file as it exists in the ZIP archive, and it hasn't been extracted, indicated by the Method and CRC32 values, it looks like they may have simply confused the default icon for a zip file in windows with that of an actual folder and tried to run the shell script inside of it, which wouldn't work at all afaik
I don't know if this is a windows 11 problem or something but the .ps1 properties doesn't have an unblock option and whenever I put in the powershell code it does nothing.