When starting EXE a Console is starting

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
This topic is 10 months and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
ralf_jantschek
Posts: 17
Last visit: Tue May 30, 2023 2:49 am

When starting EXE a Console is starting

Post by ralf_jantschek »

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: 5.8.221.0
Operating system: W10 22H2
PowerShell version(s): 5.1.19041.2673

*** Please add details and screenshots as needed below. ***
When I start the compiled EXE File lately this Console Window (see attachment) keeps starting.
Is there a way to stop this behavior?

Thank you
Ralf
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Attachments
PowerShell_Studio_Issue.png
PowerShell_Studio_Issue.png (8.36 KiB) Viewed 1741 times
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: When starting EXE a Console is starting

Post by brittneyr »

It looks like you are packaging your script with a Windows Application engine. You can change the settings when building your script from the Deploy tab on the ribbon (Deploy->Packager).

The following article may be helpful:
https://www.sapien.com/blog/2022/07/01/ ... pt-engine/
Brittney
SAPIEN Technologies, Inc.
User avatar
ralf_jantschek
Posts: 17
Last visit: Tue May 30, 2023 2:49 am

Re: When starting EXE a Console is starting

Post by ralf_jantschek »

Hello, here are my settings, it still shows this window
Attachments
PS_1.png
PS_1.png (37.6 KiB) Viewed 1695 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: When starting EXE a Console is starting

Post by Alexander Riedel »

You selected for your script to be a Windows Application. That creates a host with a main window which collects the output from your script,
just as the descriptions says.
What was the intended goal for this script?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ralf_jantschek
Posts: 17
Last visit: Tue May 30, 2023 2:49 am

Re: When starting EXE a Console is starting

Post by ralf_jantschek »

Hello,

the intended goal is to access a DB and display the results in a grid on the screen (roughly)
But while I try to "Build&run" the script there is no new EXE File generated, instead i'm getting this:
------ Build started: RM_Console, Configuration: x64 ------
Packaging with Microsoft Windows PowerShell (Command line) x64
Adding U:\Sapien\RM_Console\Development\RM_Console.Package.ps1
Writing scripts to bin\x64\RM_Console.exe
Embedding default manifest...
Error: File version has incorrect format. Use <major version>.<minor version>.<build number>.<revision>
The "Version Information" looks like:
PowerShell_Studio_Issue_2.png
PowerShell_Studio_Issue_2.png (1.36 KiB) Viewed 1631 times
As I switched the "Packaging" Settings to
PowerShell_Studio_Issue_1.png
PowerShell_Studio_Issue_1.png (4.31 KiB) Viewed 1631 times
The Console Window is gone ;-)
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: When starting EXE a Console is starting

Post by Alexander Riedel »

As far as choosing the packaging engine goes, I would recommend to read the article Brittney referred you to earlier:
https://www.sapien.com/blog/2022/07/01/ ... pt-engine/

As for the version number, the error message includes the exact details required.
"File version has incorrect format. Use <major version>.<minor version>.<build number>.<revision>"

So a valid version number would look like 1.0.0.0, 1.0.0.1 or 2.1.2.4 depending on what you want it to be.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ralf_jantschek
Posts: 17
Last visit: Tue May 30, 2023 2:49 am

Re: When starting EXE a Console is starting

Post by ralf_jantschek »

Hello,

thanks, finally it's done and does exactly what it says on the tin ;-).
Ralf
This topic is 10 months and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.