This is a question that has come up a lot lately. Our Script Packager used in PrimalScript 2009 and PrimalForms 2009 stores the scripts and additional data files encrypted and in some cases, compressed inside the executable.Some formats create temporary files and use the original Windows tool to run a script; others execute directly from […]
Tag: VBScript
Writing VBScript that really runs in PowerShell
It’s quite possible to run traditional WSH script from the PowerShell console, and people have even directly hosted VBScript in PowerShell since 2004 using the Microsoft Script Control. However, you can go farther than just loading VBScript into an object in a PowerShell session and calling its methods. You can use VBScript – or any other Active Scripting language, for that matter – as a scripting language for PowerShell.
Registry access from 32 to 64 bit and back
Just recently, I received an email asking how you can access the 64 bit registry from a 32 bit script, or vice versa. The task the individual was facing was to come up with a way to verify installed applications via checking the corresponding Windows Installer registry entries. For a C++ programmer with access to […]
Attention User Groups
We are sending our CEO and CTO on tour! SAPIEN Technologies will be visiting a number of user groups within the US to meet and discuss ideas, present new exciting products and to get feedback from you, our customers and users. Of course we will also sponsor those meetings with cool prizes and whatever goodies […]
VBScript Includes
I’ve been using VBScript for a very long time. One drawback it has always had as a scripting language is an INCLUDE statement. In other languages you can use something like INCLUDE scriptfile at the beginning of the script. This would load any functions and variables in the specified script file into your current script. In PowerShell we can accomplish this by dot sourcing scripts. I never knew of a way to do the same thing with VBScript until now.
Registering PrimalPad as your default editor
Associating a file type with a specific application has always been fairly easy to do under the various incarnations of Windows. Basically, you can right-click on a file of the type you wish to use, select the Open With | Choose Program context menu option, then select the program like PrimalPad from the list or […]
VBScript Complex Regex Replace
A few days ago I posted a blog entry on simple regular expression replacements in VBScript. Let me show you a more complex example. It helps to have a purpose, even for demonstration so my need is to convert an html table to CSV output using regular expressions.
VBScript Simple Regex Replace
Last week I talked about using Regular Expressions in VBScript. In that post I focused on simple matching. However, you can also do string replacements using the regular expression object’s Replace() method. You specify a string to replace and its replacement text. I always test the expression to make sure the string exists before doing anything. Here’s a function I use for this task.
VBScript Regular Expressions
I seem to find my self turning to regular expressions more often these days, often to help out a fellow scripter in one of the many scripting forums I keep tabs on. I thought I’d take a moment and provide a brief explanation on how to use regular expressions in VBScript. First off, for those who don’t know, a regular expression is a way of identifying or matching a string against a pattern. For example we all know that 172.16.100.200 looks like an IP address because of its pattern. The string roygbiv@rainbow.net looks like an email address, again based on the pattern. A regular expression can be used identify strings based on a pattern.
Sometimes all you need is an editor
System Administrator are a busy lot and some of them literally run around all day fighting fires on computers no longer connected to anything. Others use remote access to tend to a large number of servers. Or both. Thanks to scripting, most repetitive tasks are taken care of. But sometimes you need to double check […]