I retired a couple of years ago and haven't used Powershell Studio since then. I recently took a temporary job and got a new version of Powershell Studio, but compiling scripts doesn't behave the way I remember.
If I compile a script using the "SAPIEN Powershell V5 Host (Command line)" Script Engine option, it will open a new console when I run it from a Powershell window and all output goes to that new console with no way to recover it without just looking at it.
If I simply open a folder browser and double-click on the executable, it opens a console, then opens a second console. The output is directed to this second console.
I found a video from this past July at https://www.youtube.com/watch?v=5khkPaSNAU4 where the demonstrator was using PrimalScript Editor to do the same thing, and it did not open the extra console. Output was passed back to the calling Powershell window.
So what am I missing? Has my memory slipped? Is there some setting I haven't checked, or is this just how Powershell Studio works now. Should I have gotten a copy of PrimalScript Editor instead?
Commandline execution
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: Commandline execution
[Moved to the PowerShell Studio Product Forum by Moderator]
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:
32 or 64 bit version of product:
Operating system:
32 or 64 bit OS:
*** Please add details and screenshots as needed below. ***
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:
32 or 64 bit version of product:
Operating system:
32 or 64 bit OS:
*** Please add details and screenshots as needed below. ***
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Commandline execution
Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.167
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.15063.0
Build: v5.6.167
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.15063.0
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Commandline execution
Are you using RunAs in the packager settings to execute the script under different user credentials?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Commandline execution
Then this is expected behavior. The exe basically launches itself with the specified credentials. Since you cannot run a process as user B in a console that runs as user A, Windows creates a new console.
It *might* be possible for us to redirect the output back to the original console. I would have to investigate that.
It *might* be possible for us to redirect the output back to the original console. I would have to investigate that.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.