Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows inline ps1 when exec privilege restricted #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hmalphettes
Copy link

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.

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 invokation.
@bnii
Copy link

bnii commented Oct 22, 2021

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

@hmalphettes
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants