Product, version and build: PrimalScript 2016 // 7.2.92.0
32 or 64 bit version of product: x64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: x64
Hello - I've written a script that runs perfectly on it's own - I'm attempting to use the "Build" feature within PrimalScript to convert it to an EXE.
This feature/app works just fine on other scripts I've written on this same system.
When building, I get 0 warnings & 0 errors - it produces the EXE just fine.
When I build using the "SAPIEN PowerShell V5 Host (Windows) x64" Engine, it results in a number of "odd popups" & errors that continue until I "End Task" on the EXE... (see screenshots)
Additionally, if I building using another engine type (e.g. a the "Command Line" variant of the same V5 engine), it can result in a powershell window that shows some variant of the following text:
./3506EFD6.PS1 : The term './3506EFD6.PS1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
Hopefully this is enough info to provide some insight...
Thanks much!
Trouble "building" EXE from PowerShell Script
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.
Re: Trouble "building" EXE from PowerShell Script
Would you mind uploading the script that you attempted to package into an executable?
If you don't wish for it to be public you can upload it to https://sapien.com/support/upload and we can take a look at the cause of this.
If you don't wish for it to be public you can upload it to https://sapien.com/support/upload and we can take a look at the cause of this.
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Trouble "building" EXE from PowerShell Script
Looks like the powershell engine cannot understand the encoding of your script file.
Check in PrimalScript what the encoding of your file is. You can see that at the status bar.
Powershell cannot comprehend a few common encoding types even if a BOM (Byte Order Mark) is present.
Check in PrimalScript what the encoding of your file is. You can see that at the status bar.
Powershell cannot comprehend a few common encoding types even if a BOM (Byte Order Mark) is present.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Trouble "building" EXE from PowerShell Script
Thanks! Sorry for my delayed response - assumed I would receive a notification of any posts/replies...
I just uploaded two PS1 files that net similar results (via the URL you provided).
I just uploaded two PS1 files that net similar results (via the URL you provided).
Re: Trouble "building" EXE from PowerShell Script
For what it's worth - based on what PrimalScript shows:
The original file that I posed about was "ASCII"
The second example (included in the upload) is "UNICODE LE"...
Thanks!
The original file that I posed about was "ASCII"
The second example (included in the upload) is "UNICODE LE"...
Thanks!
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Trouble "building" EXE from PowerShell Script
Unfortunately I cannot not run your code here, for obvious reasons. I will try to make some generic samples.
I see nothing unusual in these files though (other than using a WScript popup )
Can you post what actual packager settings you use on those files and what the issue is on the second file?
I see nothing unusual in these files though (other than using a WScript popup )
Can you post what actual packager settings you use on those files and what the issue is on the second file?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Trouble "building" EXE from PowerShell Script
Yeah, absolutely. Here are the build settings:
additionally, I have a few more screenshots that show the results of a few different engine types (for the second file):
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Trouble "building" EXE from PowerShell Script
Make your extension .ps1 instead of .PS1 and see if that helps.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Trouble "building" EXE from PowerShell Script
Innnnnnteresting! so far, this corrected the issue(s) with the second one. I'm assuming (based on these results) that it will likely correct the initial issue too! Well played!
Any idea why this may be?
Thanks a million!
Any idea why this may be?
Thanks a million!