Sunday, October 11, 2009

Why KiXtart is Still Relevant

I write code using quite a few languages and API’s, including VBscript, Javascript, PHP, ASP, BAT/CMD, PowerShell, Wise, and KiXtart.  Ok, so “big deal”.  I’m just one of many, many others that do the same, even those who cover more ground than I.  But in light of my recent blog post about the perceived irrelevance of programming languages based upon age, I wanted to speak up in support of KiXtart.

So, what exactly is KiXtart?

KiXtart is a free scripting language developed by Ruud Van Velson in the Netherlands, along with the support of an enormous network of friends, colleagues, and enthusiasts around the world.  It’s been around since the 1990’s and has grown and matured incrementally ever since.  As of this posting, the current version is 4.61.

To describe it to people who write script but who have never seen it themselves, I usually say this: “It’s like CMD scripting infused with VBscript, REG.EXE, ADSI and the infamous FileSystemObject.  But better.”  With version 4.60 and later, you get a COM interface that allows you to invoke KiXtart from other programming environments.  Want to get the primary group a user belongs to?  Just invoke the @PRIMARYGROUP macro and fetch the result.  Same goes for other macros.  You can find some examples of using the KiXtart COM interface at http://scriptzilla.blogspot.com

Ease of Use

Why “better”?  Because it also includes a very simple, yet powerful collection of “macro” objects, which are essentially pre-configured global variables.  Where many other languages require you to rely on custom functions to return things like computer name, user privilege level, IP address, domain name, cpu or operating system properties, KiXtart macros like @wksta, @priv, @address1, @domain and @cpu, and @producttype hand these bits of information to you like a drive-through fast food pick-up.  This can save you countless hours of work.  It’s true that PowerShell makes many of these chores brief, but not THIS brief, sorry.  The command reference is online and can be downloaded for offline use as well.  Go to http://www.kixtart.org/?p=commandRef

Another major benefit to using KiXtart?  Portability.

KiXtart uses the self-contained KIX32.exe engine to execute and tokenize scripts.  More on tokenizing later.  But unlike VBScript/JScript, which rely on Wscript.exe and Cscript.exe, and PowerShell which relies not only on the PowerShell client, but also on the entire .NET framework stack, KIX32.exe is completely self-contained.  It doesn’t require any client deployments in order to work.  In fact, in most environments that use KiXtart, the KIX32.exe engine is placed in the NETLOGON share of domain controllers along with the scripts and run entirely from there.  No need to copy KIX32.exe or any of the scripts to the client.  Very handy.  Very nice.

Protection

Sure, you can tokenize or Kelvinate/obfuscate script code in many languages, but it’s really simple with KiXtart using the –t option.  It simply encodes your .kix script into a machine-readable form with a .kx extension.  It’s much simple to invoke and requires no certificates or other preparation.

If you can write a BAT/CMD script, or work with VBScript/ASP, you will find it very easy to pick up KiXtart as well.  In addition to scripts posted on the KiXtart web site, there are literally hundreds of web sites with useful code you can take advantage of immediately.  The nice thing to working with a language that’s been around for a long time is the amount of content that accumulates.

Overall – KiXtart is easy to drop into any environment.  It’s easy to learn and use.  It’s portable.  It’s extremely well-supported by the public.  It’s fast, and you can easily encode it for added protection.  If you’re doing any work with logon scripts, or ANY scripting to automated your daily tasks, you should be giving KiXtart a try.

Post a Comment