I’ve been doing some work lately in the newest version of SAPIEN’s PrimalForms 2009. I like to make my scripts as user friendly as possible without forcing someone to read lengthy and boring documentation. One technique that I’ve started using is to use a ToolTip control and offer a short description or instruction when the mouse hovers over a control. Let me show you. This techinque should also work with the free PrimalForms Community Edition, although you’ll need to take a few extra steps to add the necessary code.
SAPIEN’s Primal Forms 2009 now has an integrated script editor that you can use as a standalone editor for PowerShell scripts. The app has integrated help, popup command help, a PowerShell browser, a .NET object browser. As you can see in the screen shot I’ve started a very basic PowerShell script.
Once saved, I can run the script and view the results in the output panel. You can open and edit existing scripts as well. If you want a more full featured editing experience with code samples, snippets and more, or if you still need to work in other languages like VBScript, you’ll want PrimalScript 2009. But let’s say you only require an easy to use PowerShell script editor that provides a Windows Form feature, then PrimalForms 2009 is the ticket.
One thing I think you’ll like is the ability to package the script as an EXE. PowerShell still needs to be installed on any computer where you will be running the package. When you package the script, you define a package name, the platform, an icon and a manifest, if required. In the platform drop down select either 32 or 64 bit Windows. Depending on what your script is doing you may need to pick a commandline platform. Otherwise, any object written to the pipeline will be displayed in a dialog box which is probably not the experience you were expecting.
You can package your script with alternate credentials as well as digitally sign the file.
On the last page you can add metadata to your packaged script. This includes information such as version numbers, a description, file names and copyright.
When you are satisfied, click Build and your script will be packaged into an EXE. I love the idea of packaging my scripts. The content is protected and can’t be modified. Of course, the primary purpose for PrimalForms is to create a forms based PowerShell script which you can package following the same guidelines I just explained.
You can read more about the latest PrimalForms 2009 version on the SAPIEN blog.