Jump to content

Recommended Posts

Posted

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?

Posted

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

Posted
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?
Posted
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! :)
Posted

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.

Posted
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.
Posted

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 :D

Posted

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.

  • 1 year later...
Posted

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 :)

Posted
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

 

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.)

  • 1 year later...
Posted

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?

Posted

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?

Posted

I originally created all my scripts manually, and merged them into one big file using "IF InGroup" to determine which lines applied to which group of people. To map printers to particular rooms, I used something like:

 

; Set the workstation location based on name
$location = SubStr(@wksta, 5, 2)

Set "location=$location"

If AddPrinterConnection ("\\CL2KSRV01\2E-Laser") = 0
? "Added printer connection to \\CL2KSRV01\2E-Laser."
EndIf
If AddPrinterConnection ("\\CL2KSRV01\3E-Laser") = 0
? "Added printer connection to \\CL2KSRV01\3E-Laser."
EndIf

Select
;	Case ($location = 3E)
Case ($location = Room3)
	SetDefaultPrinter ("\\CL2KSRV01\3E-Laser")
	? "Default printer is 3E"
Case ($location = Room2)
	SetDefaultPrinter ("\\CL2KSRV01\2E-Laser")
	? "Default printer is 2E"
EndSelect

 

If you wanted to add just on eprinter in each room, simply move the addprinter statements into the select/case block, above default printer.

 

Alternatively......

 

You could download ScriptStart (Script Start - User Profiles Simplified) which gives you a nice web interface to work in. You just tick the boxes, fill in the printer names, set the rooms up in filters, and click the download button. COmmunity edition's free and the documentation is more than adequate to get a reasonable script up and running in about half an hour.

 

Sorry to waffle :-P

HtH

 

Ian

Posted (edited)

Thanks to CyberNerd as the suggestions made in his post worked first time.

 

ilisle: Iwill have a look at your suggestion also: Having a web interface with tick boxes does sound like it will simplify matters. :)

 

However until I can start playing with that proper I have some other issues which Kixtarts scripts may be able to help me with:

 

1. Staff MyDocuments. The home folders for staff and students in held on a Windows 2008 server and the policies for students are also held there. Student policies are all working as required. However policies for staff are set on a Windows 2003 server woking in compatibility mode [so in effect is is a Windows 200 server?] As a result I think that some of the policies I want to have applied for the staff are not being complied with. One of these is the default location of MyDocuments for staff. Currently when staff are working in, for example, an Office product and click 'Save' or 'Save As' the program defaults to C:\Program Files\...\Office 11\ as the save location [can't remember the full path because I am at home now] This is despite my best efforts. I would like to be able to force the save location to U:\

 

2. Internet Proxy. I use two settings in school: For students I use our ISA server. For staff I would like to use our Grid proxy but still get the student settings. I am sure that I have read somewhere that Kixtart can help with this also but I can't find out any more.

 

Is anyone using Kixtart to solve these problems or can any one point me in the right direction?

 

Many thanks in advance.

Edited by 6Foot2
Spelling Mistake!
Posted

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?

 

To comment out a block, and get a decent sized comment try something like this...

 

/*your comment here*/

 

Remember to include both the slashes AND the asterisks.

 

Guess who's been reading the Kixtart support document and read that bit earlier?:)

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



×
×
  • Create New...