vscode-paste-image icon indicating copy to clipboard operation
vscode-paste-image copied to clipboard

Windows inline ps1 when exec privilege restricted

Open hmalphettes opened this issue 4 years ago • 2 comments

In restricted windows machines, it is forbidden to specify a powershell execution policy and it is usually forbidden to execute an unsigned script.

Inlining the script as an encoded command avoids that problem. Note that the encoded command cannot be passed a parameter: so we need to place the value of the image path inside the script and generate it dynamically on every invocation.

hmalphettes avatar Jan 06 '21 08:01 hmalphettes

thanks, just found this and it was very useful to me

bnii avatar Oct 22 '21 11:10 bnii

If one trusts things downloaded from the internet, here is my build of the plugin with this patch: https://github.com/hmalphettes/vscode-paste-image/releases/tag/1.0.4.inlinedps

The safer thing to do is of course to build it yourself or apply the patch on the installed plugin sources.

hmalphettes avatar Nov 09 '21 00:11 hmalphettes