chrisoldwood / vdproj2wix

A PowerShell script to convert a Visual Studio set-up project to a Wix script
MIT License
39 stars 19 forks source link

Powershell execution policy #3

Open antoniohlopes opened 10 months ago

antoniohlopes commented 10 months ago

.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)

chrisoldwood commented 10 months ago

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?

Skgland commented 4 months ago

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

chrisoldwood commented 4 months ago

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 commented 4 months ago

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.