Unable to build package using psbuild.exe

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.
KPCSATOM
Posts: 5
Joined: Fri Jan 31, 2020 1:55 am

Unable to build package using psbuild.exe

Post by KPCSATOM »

Product, version and build: Powershell studio 2020 5.7.173
32 or 64 bit version of product: 64bit
Operating system:
32 or 64 bit OS:64bit

I've windows forms project. I can successfully build project to package of type windows forms powershell 5. When I save the psbuild file and try to use it to build the script using psbuild.exe I receive the following error message:

Error: No engine specified for this package. Please check your settings.

Here is the content of the psbuild file:
[MSI]
ProductGUID=
UpgradeGUID=
ProductName=atom_setup
ProductVersion=(Packaged Executable)
ProductType=Windows Application
CompanyName=KPCS CZ
ProductIcon=C:\ProgramData\SAPIEN\MSI Icons\Windows_Application_Installer.ico
ShortcutFile=
InstallFolder=[ProgramFiles]\[Company]\[Product]
MSIName=atom_setup
OutputFolder=C:\git\agent\setup
StagingFolder=
64BitInstall=0
UseUI=0
AllUsers=0
AsAdmin=0
Certificate=
CertificateThumbPrint=
Password=
TimeStampURL=http://timestamp.globalsign.com/scripts ... ature=sha2
UseSigningWizard=0
MinimumPowershellVersion=None
ServiceName=atom_setup
ServiceDisplayName=atom_setup
ServiceDescription=atom_setup
ServiceLoadGroup=
ServiceServiceType=ownProcess
ServiceStartupType=auto
ServiceErrorControl=normal
ServiceInteractive=0
ServiceVital=0
ServiceAccountName=LocalSystem
ServiceAccountPassword=
ServiceStartControl=install
ServiceStopControl=both
ServiceRemoveControl=both
ServiceWaitComplete=0
LastVersion=
[Deploy]
MainFile=
Destination=
[Package]
Output=atom_setup
OutputPath=bin
IconFile=C:\git\agent\images\atom-icon-black-on-white.ico
Manifest=
ManifestType=1
STA=1
GenerateConfigFile=0
ResolveExternalScripts=0
Password2=
Username=
Engine=SAPIEN PowerShell V5 Host (Windows Forms)
Target=Microsoft Windows 64 Bit
UseRunAs=0
PFX=
PFXThumbPrint=
TimeStamp=http://timestamp.globalsign.com/?signature=sha2
PFXPassword2=
FileVersion=1.0.1.0
ProductVersion=1.0.1.0
ProductName=atom_setup
Description=atom_setup
Company=KPCS CZ
Copyright=Copyright (c) 2020 All rights reserved
InternalName=
OriginalName=atom_setup
Comments=
RestrictUser=
RestrictMAC=
RestrictMachine=
RestrictDomain=
RestrictInstance=0
ProhibitLogging=0
DisableLogging=0
DisableTranscript=0
RestrictedOS=
AutoIncrementVersion=0

KPCSATOM
Posts: 5
Joined: Fri Jan 31, 2020 1:55 am

Re: Unable to build package using psbuild.exe

Post by KPCSATOM »

Additional info:
When I try to build it using PSBuild.exe version 4.1.82 I receive the error message: Error: No engine specified for this package. Please check your settings.
When I try to build it on the older system with PSbuild.exe 4.1.79 I receive no error message, but the executable is doing completely nothing when launched.

User avatar
Alexander Riedel
Posts: 7458
Joined: Tue May 29, 2007 4:43 pm

Re: Unable to build package using psbuild.exe

Post by Alexander Riedel »

How exactly are you calling PSBuild?
Alexander Riedel
SAPIEN Technologies, Inc.

KPCSATOM
Posts: 5
Joined: Fri Jan 31, 2020 1:55 am

Re: Unable to build package using psbuild.exe

Post by KPCSATOM »

Alexander Riedel wrote:
Thu Mar 05, 2020 9:13 am
How exactly are you calling PSBuild?
PSBUILD.EXE /PACKAGE atom_setup.psf.psbuild

User avatar
brittneyr
Site Admin
Posts: 545
Joined: Thu Jun 01, 2017 7:20 am

Re: Unable to build package using psbuild.exe

Post by brittneyr »

You cannot directly call psbuild.exe on a psf file. During the packaging process for a psf file, the file is exported to a ps1 file called [FileName].Package.ps1.
PSBuild can only package an existing PS1.
Brittney Ryn
SAPIEN Technologies, Inc.

KPCSATOM
Posts: 5
Joined: Fri Jan 31, 2020 1:55 am

Re: Unable to build package using psbuild.exe

Post by KPCSATOM »

brittneyr wrote:
Thu Mar 05, 2020 10:12 am
You cannot directly call psbuild.exe on a psf file. During the packaging process for a psf file, the file is exported to a ps1 file called [FileName].Package.ps1.
PSBuild can only package an existing PS1.
This is not true as I successfully did that for last 14 months.

KPCSATOM
Posts: 5
Joined: Fri Jan 31, 2020 1:55 am

Re: Unable to build package using psbuild.exe

Post by KPCSATOM »

KPCSATOM wrote:
Thu Mar 05, 2020 10:14 am
brittneyr wrote:
Thu Mar 05, 2020 10:12 am
You cannot directly call psbuild.exe on a psf file. During the packaging process for a psf file, the file is exported to a ps1 file called [FileName].Package.ps1.
PSBuild can only package an existing PS1.
This is not true as I successfully did that for last 14 months.
My apologies. Now I see what you mean. So is there any way, how to automate the build of the exe from the psf file?

User avatar
Alexander Riedel
Posts: 7458
Joined: Tue May 29, 2007 4:43 pm

Re: Unable to build package using psbuild.exe

Post by Alexander Riedel »

Not at the moment unfortunately. The way the designer works, which is required for the export, it needs PowerShell Studio to run.
We are looking into options.
Alexander Riedel
SAPIEN Technologies, Inc.