Page 1 of 1

Packageing a Powershell, Command Line Arguments

Posted: Wed Feb 22, 2012 2:34 pm
by CrazyLloyd72
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

Packageing a Powershell, Command Line Arguments

Posted: Thu Feb 23, 2012 3:10 am
by davidc
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