Jump to content

KiXtart-scripts instead of Batch-files


Recommended Posts

I've been working on putting together my own unattended cd, with integrated Registry-tweaks, services-settings, programs, etc. Been working with Batch-scripts for 4 years now, and I know there's a lot you can do with them, but I like to do stuff straight to the point. And then I found KixTart ( http://www.kixtart.org ). So I've been busy converting and simplifying my Batch-scripts to KiXtart-scripts.

But I was wondering, first off all, why I found only 3 posts related to KiXtart in this forum, because it seems to me as a way more powerful language than Batch. You can do everything you can do in batch, and way more. And it was designed to be used for login-scripting purposes (though it's much more powerful since the last version), so wouldn't that fit with an unattended setup?

Second, I think it should work, but I'm not sure :). KiXtart needs only one 236 KB executable. So I thought I'd just launch "kix32.exe script.kix" from my first batch. Anything nasty I overlooked? I mean, KiXtart was designed to manage login-scripts, so I don't really think it needs priveleges to do the the stuff I want it to..Still I'm not sure, and it like to know what I'm doing before I test the cd with Virtual PC (takes a lot of time and diskspace)

Link to comment
Share on other sites


I have been using kixtart for a while now and I love it. It is way more powerful. Our company started using it for logon scripts because we needed something that could check group membership, etc. Very powerful tool. For simple program execution I still use batch files but when I need to process data, message boxes, AD group membership, I use kixtart.

In kix you can tell the script to shell out and run something directly at a command prompt such as a batch file.

-Matt

Link to comment
Share on other sites

There's a New kid in town soon, MSH, coming to an XP PC near you!!!!!!

msh get-process | where-object -Expression "processname -like *cs*"

dam looks UNIX

It's powerful but semi-hard to learn

Think I like's the cmd.exe

Link to comment
Share on other sites

Nope, it doesn't use the same syntax, but's very easy. I've converted about 200 lines of Batch to Kix in 5 minutes :rolleyes:. I've really grown to like it in the 2 days I use it now...

Please note that KiXtart is freeform :) meaning as long as commands are seperated with whitespace (space, newline, tab) it's okay!

For example:

SetConsole("Hide") 
Dim $SystemDrive $SystemDrive = ExpandEnvironmentVars("%SystemDrive%")
Shell($SystemDrive + "\Install\App.exe /switches")

This looks like a lot of code, but it's really not! I'm 17, have done almost nthing concerning scripting / coding and have already got the hang of it in two days!

The first line hides the console (Try to do that in Batch! )

Second line declares var for use and gives it a value (remember, freeform, these are actually two seperate commands), note that you CAN't use Environment Variables directly in code (only thing I don't like, but it's a minor thing)

The third executes the app and waits for it.

See http://www.kixtart.org/ for download, syntax-/commands-info and examples

BTW. Because of the syntax, you could also write this code as:

SetConsole("Hide") $SystemDrive = ExpandEnvironmentVars("%SystemDrive%") Shell $SystemDrive + "\Install\App.exe /switches"

(variables don't have to be explicitly declared and most commands don't need ())

Check out http://www.kixforms.org/ It's only a beta, but it gives you a GUI for your scripts! I've already seen text-editors and stuff :D

Link to comment
Share on other sites

Maybe I should have been more careful with that statement :). Thanks for the info! Fact remains, though, that KiXtart has a lot more to offer to me than Batch.

But what about my question? Anyone any idea's about any possible drawbacks of my setup?

I'll check out the KiXtart forums too.

Link to comment
Share on other sites

If for some reason you can't run the script engine at a certain point, taht could cause problem. Otherwise, function errors (which you would get with batch as well) or user error.

I think batch is used because it's easier for most people to understand, i did say most not all. :) It's also the "native" language in windows. There is no extra interpreter needed. It's already included with windows.

But for what most people want, WIHU/XPLODE/WPI is what they want. A nice looking GUI that installs stuff for them. Not a console.

But I find batch is extremely powerful, more so then most people know, simply because they don't understand what it can do.

Link to comment
Share on other sites

I am a Mod at Kixtart.org, and kix is WAY more powerful than most people give it credit for...

It has built into it all the INI and reg tools anyone would want.

It works with COM, ADSI, LDAP, NTDS, and for the trouble cases, it can shell out to 'dos' tools

KiXtart, it isn't just for logon scripts anymore... :)

Link to comment
Share on other sites

When I couldnt find a satisfactory utility to get the mac address into a variable for my server builds, I turned to Kixtart. This small script is used with kix v2.33, the last version of kix for DOS. Its small enough that it fits on the network boot disk and I use it for setting the workstation name, and creating a network temp directory to store files during the build process. Ugly but it works.

$SMAC=SUBSTR(@ADDRESS,Len(@ADDRESS)-7,8)

Shell "w:\SrvrBld\PreBld\Kix\SETW MACADD=$SMAC"

Link to comment
Share on other sites

@Radimus:

Maybe, just maybe, you can tell me if KiXtart requires a logged in account to really change system-settings like registry-stuff? I'm still wondering if I'll be able to use KiXtart for the scripts that will be run at T-13.

-----------------------------------

I've already registered for an account at KiXtart.org's forum, but things aint working, so I have no place to ask...

My mail to info@kixtart.nl:

Hi, I really want to register at the bulletin board cause I have a few questions to ask about KiXtart, but I can't register! Well, to be exact, I can register, but I don't receive the verification e-mail. My first attempt has been 3 days ago, so I did try just waiting for a while  :D . My second attempt (with a dfferent e-mail of course) was yesterday. Haven't received an e-mail about either attempt. I am sure I filled the right e-mail, because for both accounts I can ask to sent me a temp-password (I forgot my password option), but those e-mails don't arrive either. I use mail everyday, and both accounts function, today, yesterday, the day before... Neither do I use a spam-filter. So I can't really think of anything I've done wrong...

I really do hope you'll react, and I will be able to get an account so I can get on with my Unattended Windows XP Setup 'project' (unattended.msfn.org).

Thanks in advance!

They said no info was found on any of the two logins I registered :) But they would register me a new account. Still haven't received a confirm of that registration :rolleyes:

Link to comment
Share on other sites

checked out KiXtart - looks good.

My view on why CMDs are better:

1. Batch-files are processed by a native part of the OS, and as such, are very deeply tied in to the system and are very powerful.

2. KiXtart is too 'Unix'y to appeal to micro-softies.

3. KiXtart looks like more of a scripting and programming language, unlike the simple and easy to understand batch-files.

4. Lastly, those who want a good-looking front-end move out of batch-files and into GUI tools, not another script-based tool.

Link to comment
Share on other sites

For the GUI tools, check out kixforms.org which has a freeware addon dll to enable gui frontends... I have written MANY admin tools with it.

As for whether 'dos' is better than kix, I'd have to say that kix can do FAR MORE than can dos natively... eventually there will be things that each cannot do without additional tools, but kix will go farther. and includes much more functionality than does and number of commandline tools. Take REG.exe for example. MS included it with XP, but didn't before... Kixtart can manage the registry natively... but it isn't a contest.

It is a scripting language, made for logonscripts, but it has so far exceded that expectation that there is no longer any comparison. And it is SO MUCH easier to read than a batch file... my last logon script is over 90k and not 1 goto is to be found :)

Kix runs under the environment of the current user, so I'd expect that if it were running during setup, I suppose that it would be under the system or administrator context. I did use a kix script that used WMI to determine make and model of the PC and install the correct chipset.exe... I called it from commandlines.txt and it worked fine

I'll forward the registration problem to the admins... Lonkero or NTDOC should be able to hook you up... unfortunately they isn't online right now

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...