I recently tried to convert to EXE and the executable will not run on W7 x64 with PS2.0 installed anymore.
This had been built many times before and was properly running on those systems.
In addition, no modifications were made on the script itself between the previous script version and the latest one (only a couple of variable names were changed).
Also, for the script to run on Windows 10, we need to provide the .config file alongside which wasn't the case in the past.
We just built one single executable and successfully ran on both OS.
Powershell Studio version: 5.6.162 running on Windows 10 1803 x64
This is the psbuild info:
Code: Select all
[Package]
Output=program2.3.1
OutputPath=bin
Target=Microsoft Windows 64 Bit
IconFile=applic.ico
Manifest=
ManifestType=1
STA=1
ResolveExternalScripts=0
GenerateConfigFile=0
Password2=
Username=
Engine=SAPIEN PowerShell V2 Host (Windows Forms)
UseRunAs=0
PFX=
TimeStamp=http://timestamp.globalsign.com/scripts/timstamp.dll
PFXPassword2=
RestrictUser=
RestrictMAC=
RestrictMachine=
RestrictDomain=
RestrictInstance=1
RestrictedOS=
ProhibitLogging=0
DisableLogging=0
DisableTranscript=0
FileVersion=2.3.1.0
ProductVersion=2.3.1.0
ProductName=Program Name
Description=Program Name (PS2)
Company=Company Name
Copyright=Copyright (c) 2017 All rights reserved
InternalName=
OriginalName=program2.3.1
Comments=
AutoIncrementVersion=0
PFXThumbPrint=
Microsoft Windows 7 Professional
OSArchitecture : 64-bit
Code: Select all
PS C:\> $psversiontable
Name Value
---- -----
CLRVersion 2.0.50727.8800
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1