Scripts Thread, KiXtart in Coding and Web Development; I'm experimenting with KIXtart to see if its any better/worse than the multiple VBS/BAT files i use at present
There ...
-
14th June 2006, 07:55 PM #1 KiXtart
I'm experimenting with KIXtart to see if its any better/worse than the multiple VBS/BAT files i use at present
There is one Major VBS script that I have - Per Room Printer Mapping - and not sure how to do a similar thing in KiX
Another VBS script I have is to rename network drives so that the kiddies cannot see the sharename & path - again how can i do this in KiX
Or can i get Kix to run these VBS scripts?
-
-
IDG Tech News
-
14th June 2006, 10:02 PM #2 Re: KiXtart
Kix is supposed to be good little language but I have read plenty of times how people have migrated away from Kix to VBS.
Just looking through http://scriptlogic.com/Kixtart/htmlhelp/default.asp
I can see the commands to find out host names and how to add printer connections on the first page.
So theres your start.
-
-
14th June 2006, 10:10 PM #3 Re: KiXtart
The thing with kix is that you need th kix interpreter to run the scripts whereas vbs is native.
Ben
-
-
15th June 2006, 07:14 AM #4 Re: KiXtart
select
case %room%="EDUGEEK"
If ADDPRINTERCONNECTION ("\\server\borther-2040") = 0
IF SetDefaultPrinter ("\\server\brother-2040") = 1
Endif
Endif
endselect
EXIT
Just need to set a new enviroment variable called ROOM with the value EDUGEEK and away you go
-
-
15th June 2006, 07:22 AM #5 Re: KiXtart
Never used KiX myself but i cant really see the point of migrating from one language to another... wouldnt it be loads of kix scripts instead of vbs scripts?
-
-
15th June 2006, 07:52 AM #6
- Rep Power
- 0
Re: KiXtart
A while ago I was experimenting with some kix logon scripts someone else had written to try and make them faster, discovered that the logon time problem was elsewhere and left the scripts alone. The language looked interesting and well suited to login scripts and such. More powerful than batch files, but doesnt come close to linux/unix shell scripts!
-
-
15th June 2006, 03:44 PM #7 Re: KiXtart
We use kixtart for our logon scripts here. It's pretty good in that you can do simple things easily and for complex things people have made ready-made functions that you can bolt together easily. That's how I made the chunk of script which audits user logins to a sql database. Another nice feature of kixtart is that it logs the user out if they manage to close the login script while it's running.
Send me a pm if you want to see our printer management script - it adds printers based on user, group membership and room in just about any combination from an easy-to-edit ini file. Yes, pride of batch files is a bit sad.
@plexer you just have to run kix32.exe from netlogon, so there's nothing tricky there.
-
-
15th June 2006, 05:02 PM #8 Re: KiXtart
Used to use KiX to map printers but decided to convert to VBS cos it made more sense to me and I seem to remember having some issues at the time.
-
-
15th June 2006, 05:45 PM #9 Re: KiXtart
Still playing about with KiX and not decided whether to implement it yet -
Currently have about 4 VBS scripts and several batch files so may combine the batch files into KiX and leave the VBS ones alone as they are used for the printers, to rename the Network drives, etc
I like that you can put information into a "Box" - handy for when your deleting all the kids MP3s and Games
-
-
15th June 2006, 09:04 PM #10 Re: KiXtart
Used to use KiX, but moved away from it as was having trouble remembering the syntax for KiX, VB, VBS, VBA.
Nowadays I have the same problem trying to remember syntax for VBS, CMD , AutoIT and soon PowerShell no doubt.
What's good about each one?
KiX - Some nice built in functions to ease logon scripts (group membership checking being the most obvious I suppose)
VBS - No interpreter required. Will run on any Windows box these days. Can do most things with WMI, ADSI, ActiveX etc.
CMD - Again, nothing extra required. Can do some very clever things but syntax seems less self explanatory. Can launch a 16bit app and wait for completion before continuing. Not easy from VBS/AutoIT (dunno about Kix).
AutoIT - Great functions for automating tasks, watching for dialogs, clicking buttons etc. Plus it compiles to executable. Now supports creation of GUIs. Comes with comprehensive help and a reasonable IDE (SCiTE)
PowerShell - Only had a brief look, but it can be very powerful. There's an an example single line command which iterates through all your Exchange servers looking for disconnected mailboxes and reconnects them to matching user accounts.
-
-
26th November 2007, 04:06 PM #11 Re: KiXtart
We use KIX pretty much exclusively here, moving from a combined legacy of .BAT and .VBS.
Took some time to get my head around it but now I use it for pretty much everything.
.BAT files are good, if it's a simple job - use them, for anything more complex I use KIX.
I can always convert .VBS to KIX relatively easily anyway, plus the support network for KiX is fantastic
-
-
27th November 2007, 12:11 AM #12
- Rep Power
- 11
Re: KiXtart

Originally Posted by
danIT select
case %room%="EDUGEEK"
If ADDPRINTERCONNECTION ("\\server\borther-2040") = 0
IF SetDefaultPrinter ("\\server\brother-2040") = 1
Endif
Endif
endselect
EXIT
Just need to set a new enviroment variable called ROOM with the value EDUGEEK and away you go
Code:
Dim oNet
Set oNet = CreateObject("WScript.Network")
If LCase( Left( oNet.ComputerName, 2 ) ) = "pe" Then
strConnectString = "\\ntserverx1\ICT-MF"
strResult = objWSHNetwork.AddWindowsPrinterConnection(strConnectString)
End If I've never heard of Kix until I read this topic, but I'm not entirely sure what the advantage to using it is?
I use VB to map drives based on groups/computers, add printers based on computer names and have had no problems with it, nor does it appear to have any impact on logon times.
All the info on VB is widely available too - the fact that if you can use the command in VB6, you can probably use it in a VBS script. (I've only made a quiz in VB before, so I wouldn't know if that's totally true.)
-
-
10th December 2008, 04:01 PM #13 I am now using Kixtart to add network printers for staff at logon. I would like to know:
1. What the syntax is to remove any printers already attached [I am getting one printer installed at all stations and can't find where it is coming from] Until I can find the source of it I would like to remove it, installing it only for stations in that room.
2. What the syntax is to comment in a Kixtart script. I have tried 'REM' and ';' at the start of the line I want to enter a helpful comment but this seems to crash my script.
Any ideas?
-
-
10th December 2008, 04:09 PM #14 1) try delPrinterConnection
2) ;
edit: delprinter connection
http://www.scriptlogic.com/Kixtart/h...connection.htm
-
Thanks to CyberNerd from:
DaveP (10th December 2008)
-
10th December 2008, 04:31 PM #15 I am now using Kixtart to add network printers for staff at logon. I would like to know:
1. What the syntax is to remove any printers already attached [I am getting one printer installed at all stations and can't find where it is coming from] Until I can find the source of it I would like to remove it, installing it only for stations in that room.
2. What the syntax is to comment in a Kixtart script. I have tried 'REM' and ';' at the start of the line I want to enter a helpful comment but this seems to crash my script.
Any ideas?
-
SHARE:
Similar Threads
-
By ninjabeaver in forum Downloads
Replies: 10
Last Post: 16th June 2005, 12:11 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules