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 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
MaureenC
Posts: 26
Joined: Thu Mar 06, 2014 6:08 am

Can I use PowerShell Studio build Installer from a command line

Post by MaureenC » Fri Oct 25, 2019 8:57 am

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: 7125
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Fri Oct 25, 2019 9:58 am

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: 26
Joined: Thu Mar 06, 2014 6:08 am

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

Post by MaureenC » Fri Oct 25, 2019 11:13 am

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

Thanks so much!
Maureen

User avatar
MaureenC
Posts: 26
Joined: Thu Mar 06, 2014 6:08 am

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

Post by MaureenC » Sat Oct 26, 2019 1:33 pm

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