vdproj2wix icon indicating copy to clipboard operation
vdproj2wix copied to clipboard

Powershell execution policy

Open antoniohlopes opened this issue 1 year ago • 4 comments

.ps1 files cannot be load and/or executed. The execution the ps1 files are limited to the digitally signed, to bypass this; the command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine" is necessary to execute vdproj convertion to wix. To block not signaled powershell script, execute this command "Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope LocalMachine" more details in [About execution policy] (https:/go.microsoft.com/fwlink/?LinkID=135170)

antoniohlopes avatar Dec 27 '23 04:12 antoniohlopes

Sorry, I'm not sure what you're asking here? What you've described above is basic PowerShell documentation for executing scripts but there doesn't appear to be an actionable point to this issue. Can you say more about what you're expecting from this?

chrisoldwood avatar Jan 04 '24 16:01 chrisoldwood

I think the file was probably marked as downloaded from the web, Mark of the Web.

One can unmark a file in the file properties by checking the Unblockcheckbox. image

Skgland avatar Jul 11 '24 13:07 Skgland

Or, given you'll probably already be in a PowerShell session to run the script, you can use the Unblock-File cmdlet, e.g.

PS> Unblock-File vdproj2wix.ps1

As for the default execution policy I've tended to default to RemoteSigned which gives me enough rope for local development.

chrisoldwood avatar Jul 17 '24 11:07 chrisoldwood

As I was the author of the script I've never had to download the .ps1 file directly from GitHub so it's never been blocked, hence it seems like I need to add a comment to the README at some point about doing this.

chrisoldwood avatar Jul 17 '24 11:07 chrisoldwood