Sapien PowerShell Studio Packager

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 6 years and 7 months 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
Nillth
Posts: 34
Last visit: Mon Oct 30, 2023 10:52 pm
Has voted: 2 times

Sapien PowerShell Studio Packager

Post by Nillth »

Product, version and build: PowerShell Studio 2017 v5.4.142
32 or 64 bit version of product: 64
Operating system: Windows 10 (1607)
32 or 64 bit OS: 64

I have written a PowerShell script that collects a bunch of information on a client system, it has been designed to be lowest common denominator.
I.e. the functions and commands in the script all work on Windows Server 2008/Windows 7 with Powershell V2 and up to Server 2016/Windows 10 with PowerShell V5

The Script itself is then wrapped it up as a Exe using the Packager.

What I have found recently is that many newer servers/workstations, do not have .Net 2.0 installed...
So if i Package the Executable as a "SAPIEN PowerShell V2 Host (Windows Forms)" the end user gets prompted to install the .Net 2.0 package.
Alternatively if i run the exe on a older system using the "SAPIEN PowerShell V3 Host (Windows Forms)" they get prompted for .Net v4.0

https://info.sapien.com/index.php/packa ... requisites

Is there anyway I can configure the Packager so that the file can be run with either version of the .Net Framework?
or do i have to Package Both versions, then select one of the exe's based on the available .net version?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Sapien PowerShell Studio Packager

Post by davidc »

Are you including the config file with the V2 version of the executable?

David
David
SAPIEN Technologies, Inc.
User avatar
Nillth
Posts: 34
Last visit: Mon Oct 30, 2023 10:52 pm
Has voted: 2 times

Re: Sapien PowerShell Studio Packager

Post by Nillth »

Hi David,
No I had not been including the .Config file.
I had been attempting to get everything down to just the one .exe file.
However, I have just retested with the .config file and it worked perfectly...

guess i will need to include it from now on, unless you have some other magic way to make it work?

Thanks!!!!
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Sapien PowerShell Studio Packager

Post by davidc »

Unfortunately including the config file is necessary. The config file allows the executable to use other .NET versions if necessary. It also allows older modules / assemblies that were built with .NET 2.0 to work in later versions of .NET.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 7 months 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.