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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
Nillth
Posts: 13
Joined: Thu Aug 01, 2013 6:14 pm
Location: Melbourne, Australia

Sapien PowerShell Studio Packager

Post by Nillth » Thu Jul 27, 2017 7:12 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Re: Sapien PowerShell Studio Packager

Post by davidc » Fri Jul 28, 2017 11:49 am

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

David
David
SAPIEN Technologies, Inc.

User avatar
Nillth
Posts: 13
Joined: Thu Aug 01, 2013 6:14 pm
Location: Melbourne, Australia

Re: Sapien PowerShell Studio Packager

Post by Nillth » Tue Aug 01, 2017 10:49 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Re: Sapien PowerShell Studio Packager

Post by davidc » Wed Aug 02, 2017 7:34 am

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.