Page 1 of 1

Sapien PowerShell Studio Packager

Posted: Thu Jul 27, 2017 7:12 pm
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?

Re: Sapien PowerShell Studio Packager

Posted: Fri Jul 28, 2017 11:49 am
by davidc
Are you including the config file with the V2 version of the executable?

David

Re: Sapien PowerShell Studio Packager

Posted: Tue Aug 01, 2017 10:49 pm
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!!!!

Re: Sapien PowerShell Studio Packager

Posted: Wed Aug 02, 2017 7:34 am
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.