Packageing a Powershell, Command Line Arguments

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
CrazyLloyd72
Posts: 1
Joined: Wed Feb 22, 2012 3:34 pm

Packageing a Powershell, Command Line Arguments

Post by CrazyLloyd72 » Wed Feb 22, 2012 3:34 pm

Hi,

I have packaged a powershell script using Primal Forms, and I have used the option for Execution to 'Run as specified user', and using the 'Run in STA mode' as the script is GUI based.

I have some optional paramaters being passed using the $args value.

When I test the script as a ps1 file, the arguments work without any issues, but when packaged as an executable the arguments are not passed.

Any suggestions? or Have I approached this incorrectly...

Lloyd

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Packageing a Powershell, Command Line Arguments

Post by davidc » Thu Feb 23, 2012 4:10 am

Its hard to tell what is happening without looking to the script. You could try using the $Commandline variable instead. Please refer to this blog article for more information: http://www.sapien.com/blog/2010/02/09/p ... ents/David
David
SAPIEN Technologies, Inc.