Can I use PowerShell Studio build Installer from a command line

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 4 years and 5 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
MaureenC
Posts: 30
Last visit: Sun Mar 14, 2021 12:36 pm

Can I use PowerShell Studio build Installer from a command line

Post by MaureenC »

Product, version and build: PowerShell Studio 2019 version 5.6.267 (64 bit vsn)
Operating system: Windows 10 64bit

I'm trying to see if I can automate my devOps pipeline with PowerShell Studio. Is there a way to invoke the Settings and Build capabilities for the Deploy Installer and/or Packager features from a script?

Thanks
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: Can I use PowerShell Studio build Installer from a command line

Post by Alexander Riedel »

Yes, in the install folder of PowerShell Studio you find a command line application called 'psbuild.exe'

SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2019 SAPIEN Technologies, Inc.

Usage:

psbuild /<option> <settings file>
where <option> is one of

PACKAGE
MSI
DEPLOY
BUILD

A settings file is the .psbuild file you find alongside your script.

If this is a forms project though this won't work because the resulting script is generated by Powershell Studio at build time.
I do believe there are command line parameters for Powershell Studio itself, but I will have to check with them, if that is what you need to do.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
MaureenC
Posts: 30
Last visit: Sun Mar 14, 2021 12:36 pm

Re: Can I use PowerShell Studio build Installer from a command line

Post by MaureenC »

I will definitely try this over the weekend and let you know.

Thanks so much!
Maureen
User avatar
MaureenC
Posts: 30
Last visit: Sun Mar 14, 2021 12:36 pm

Re: Can I use PowerShell Studio build Installer from a command line

Post by MaureenC »

These worked great for my MSI and EXE use cases!

'C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2019\PSBuild.exe' /msi 'D:\demoMSI\DemoHelloWorld.ps1.psbuild'

'C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2019\PSBuild.exe' /package 'D:\demoEXE\DemoHelloWorld.ps1.psbuild'

Thanks again so much
This topic is 4 years and 5 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.