Posts Tagged ‘commandline’


 

Revisiting The Packager and Command Line Arguments

Thursday, October 25th, 2012 by David Corrales
The original The Packager and Command line Arguments blog article discussed how to pass parameters to a packaged executable. In this article we will revisit this subject and update the functions introduced in the previous article. The article will also cover how to simulate the packager parameters so that you can test your script without having to package it each time. This article’s example uses PowerShell Studio 2012, but it is also applicable to PrimalScript 2012. Command Line Parsing Functions: The original Convert-ArgumentsToDictionary function is no longer valid since PowerShell converts the Dictionary to an array when you return the…   More »

PrimalForms 2009: The Packager and Command line Arguments

Tuesday, February 9th, 2010 by David Corrales
Per forum request, this blog provides examples of how to access the packager’s command line arguments as well as provide some useful functions to parse the contents. These examples apply to PrimalForms 2009’s Packager and as well as PrimalScript 2009’s packager. The package’s script host provides a convenient string variable named $CommandLine. This variable contains the complete argument string that is passed to the package. To illustrate how the $CommandLine variable is used, a script package named “mypackage.exe” will be executed  with the following arguments: mypackage.exe –Parameter1 Value1 –Parameter2 Value2 The resulting string value of $CommandLine is as follows: $CommandLine:…   More »

Wayne’s World of IT Revised

Tuesday, September 23rd, 2008 by Jeffery Hicks
I've blogged in the past about Wayne Martin and his outstanding list of command line tips. These are one line commands, some complex some simple, that you can use to accomplish a wide range of task. The overall number of tips is to 425 and Wayne recently reorganized them into 7 categories to make it easier for people to digest. There's very little scripting with any of these commands. Most use native or freely available command line tools. But because they are executed from a command line you could incorporate them into a script. I encourage you to check them out.   More »