To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: sapien powershell studio 5.8.191.0
Operating system: windows 10 2004
PowerShell version(s): 5.1.18362.1171
Hi there, after i compiled my project to an EXE I get a warning about warning about script security. please see attached. How can this be avoided or configured in the EXE?
Thanks
*** Please add details and screenshots as needed below. ***
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Security warning on compiled exe
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Security warning on compiled exe
Are you running a script from within the packaged code?
How exactly have you packaged your script into an exe?
How exactly have you packaged your script into an exe?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
Re: Security warning on compiled exe
Package build (CTRL +F7) then copy the exe from Projects\(project)\bin\x64
I did manifest creation (Embed a default manifest for request elevation. because the app should run with admin rights.
I did manifest creation (Embed a default manifest for request elevation. because the app should run with admin rights.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Security warning on compiled exe
The dialog you see is a PowerShell security prompt for running unsigned and/or blocked scripts.
A packaged executable using a SAPIEN Script host does not execute your code as a script, so it would not cause that warning.
Hence my questions:
Are you running a script from within the packaged code?
What script engine did you package with? (Sorry if my question was not precise enough)
A packaged executable using a SAPIEN Script host does not execute your code as a script, so it would not cause that warning.
Hence my questions:
Are you running a script from within the packaged code?
What script engine did you package with? (Sorry if my question was not precise enough)
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
Re: Security warning on compiled exe
Also when I click run ( non compiled version within Sapien by pushing F5) I don't get the prompts
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Security warning on compiled exe
Yes, that is what I meant.
That would not trigger that security warning.
In the code you package as an executable, do you use any external scripts or modules?
That would not trigger that security warning.
In the code you package as an executable, do you use any external scripts or modules?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am
Re: Security warning on compiled exe
I do
if not what is the best way to add other ps1 files and control load order?
what if I add the other PS1 as a local file . .\logging_module.ps1?if not what is the best way to add other ps1 files and control load order?
-
- Posts: 7
- Last visit: Fri Nov 12, 2021 11:21 am