Link to home
Start Free TrialLog in
Avatar of it_gsr
it_gsr

asked on

Kixtart 4.22 installation

Hi,
Got kixtart 4.22 but cann't through with the installation on either XP professional or 2003 server. Can somebody walk me through the installation?

Cheers
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


There is no installation to do...

You use the scripts by writing a batch file something like this:

logon.bat

kix32.exe logon.kix

logon.kix

<all the commands you want to run>

Copy Kix32.exe, logon.bat and logon.kix into the Netlogon share of your domain controllers.

Yell if you need further help with this.
Avatar of it_gsr
it_gsr

ASKER

Not clear what you are trying to show me. Can you be a little bit detail about how to go about it?

Thanks
Of courses :)

Before I begin though, what are you trying to use Kixtart for? The normal use is Logon scripts, that's what it was originally written for, but it can do more if you want it to.

Basically, all Kix32.exe does is process commands. This is exactly the same as using cmd.exe as the script processor for batch files; Perl.exe as the processor for .pl files; wscript or cscript as the processors for VB Script etc etc.

So as an example, in DOS we map a network drive like this:

C:\> net use z: \\server\share

In Kix we use slightly different syntax

use "z:" "\\server\share"

The "" above aren't always needed, but if you have a hidden share ($), or spaces in the share name they are. In the same way that DOS knows what to do when it sees the Net Use command Kix knows what to do when it sees the Use command.

Now the advantage of Kix is that it can do a lot more than a simple DOS type batch file, for instance it can easily check against a Group and only do something if the user concerned is a member of the group (defaults to domain groups).

Unlike Cmd.exe or Command.com, Kix32.exe isn't a command processor Windows will try and use without us telling it to. In addition to this the Kix32.exe file expects you to give it some kind of file to use, so we'll tell it to process the commands in logon.kix:

C:\> kix32.exe logon.kix

Of course for a logon script you can't be typing that in, so that part goes into a Logon.bat file (which Windows knows how to deal with anyway).

So now we have the logon.bat file which only has the line:

kix32.exe logon.kix

And nothing else.

But we still don't have a logon script to run, so that needs to be written. In a file called Logon.kix (just a renamed text file) we can start adding the things we actually want to do. For example, a little script to map a drive:

use "g:" "\\server\everyone"

If InGroup("Domain Admins")
    use "h:" "\\server\admin$"
EndIf

If InGroup("Account Operators")
    use "i:" "\\server\general"
EndIf

Now the logon script does different things depending on which group the user logging on is in, if the user is in both it will try and do both.

Make sense so far?

Anyway, let me know what you'd like to use it for and I can be a bit more specific with the details.
Avatar of it_gsr

ASKER

HI,
Exactly what i want to do with it. Map drive and printers for users depending on the groups in which they belong. Trying with what you sent me but you can still add more filla.
Thanks man

The rest is a bit dependant on the your exact circumstances, the InGroup command (for instance) will quite happily work with any of your AD Groups.

There's an AddPrinterConnection command available if you wanted to add printers for users through the script.

If InGroup("Printer 1 Users")
    AddPrinterConnection("\\Server\Printer")
EndIf

Of course it doesn't have to be group based, and the AddPrinterConnection("\\Server\Printer") command on it's own will also work perfectly well.

It's a very flexible language and will allow you to test against anything from the logon server used to the exact version of Windows to a Group. Then map drives, deal with printers, alter the registry, pretty much whatever you might want from a logon script.

There's a full list of the available commands in the Word document included in the Zip file.
Avatar of it_gsr

ASKER

Did this:
Created a batch file called logon.batch which contains only this
kix32.exe logon.kix.

Then created logon.kix which contains this

use "g:" "\\bgs-it005\server structure"

If InGroup("Domain Admins")
    use "h:" "\\bgs-it005\server structure$"
EndIf

If InGroup("finance")
    use "i:" "\\bgs-it005\server structure\yawb\kwat"
EndIf

Afterwards i copied the kix32.exe,logon.batch and the logon.kix into the Netlogon folder under the winnt\sysvol.......folder
But when i logon with a user in the finance group, the drive wasn't mapped for the user.
What did i do wrong?

Logon.bat? Or Logon.batch?

Should be logon.bat or Windows won't know what to do with it. Try this for the Finance Group:

If InGroup("Finance")
    use "i:" "\\bgs-it005\Server Structure"
EndIf

I don't think it'll be too keen on mapping beyond \\Server\Share.

There is also a nice debugging option which can help you find a problem, to use debugging copy kix32.exe and the logon.kix file onto your computer, head to the command prompt and the folder you copied them to and type:

kix32.exe logon.kix /d

This will give you line by line debugging so you can see where it breaks :)
Avatar of it_gsr

ASKER

sorry it was logon.bat. I changed the inGroup("Finance") to read only

If InGroup("Finance")
    use "i:" "\\bgs-it005\Server Structure"
EndIf
 Still the drive is not mapped.

Did the Domain Admins mapping work correctly?

You definately have the Group Name correct?

Have you tried adding yourself to Finance and running the script in debug mode? kix32.exe logon.kix /d with it all on your local computer
Avatar of it_gsr

ASKER

Have taken out the Domain Admins mapping to test only the finance group. I have the group name rite and have maself added to the finance . When i run the debug mode, it just highlight this"if InGroup<"finance">

Yep, if you press space again it should run the command, that's where it should either drop into the If statement or maybe boot out with an error.
Avatar of it_gsr

ASKER

After pressing the spacebar three times,
it did not come up with any error and the drive is still not map.

At the command prompt type

net use

If there is anything at all listed for either that share path or that drive (including disconnected) do:

net use <drive> /d
or
net use <share> /d

If it runs that map command it might be conflicting with an existing persistent mapping.
Avatar of it_gsr

ASKER

when i run net use i: /d, i get this msg: the network connection could not be found.
when i run the net use server structure /d i get this msg: the command was used with conflicting switches

with:

net use \\server\share /d

?

That should delete any active connection to a share path. It would pull up conflicting switches if you did //server/share in there. If it's not there it should repeat "The network connection could not be found".
Avatar of it_gsr

ASKER

Did \\bgs-it005\server structure /d and it gives me this error "A command was used with conflicting switches
Ahh sorry... it's the space in the name, try

net use "\\bgs-it005\server structure" /d

DOS is also no good with spaces ;)
Avatar of it_gsr

ASKER

with \\bgs-it005\server structure/d, this error msg came:
logon failure:unknown user name or password.
Avatar of it_gsr

ASKER

Hello,
I am still need help mapping my drive with the kistart 4.22 software. Can i get some help?

Cheers

Sorry... went to bed ;)

The command you need in DOS should be:

C:\> net use "\\bgs-it005\server structure" /d

That should clear out any active connection to the share (which can cause Kix to fail on a mapping).

Try the mapping in Kix without the If InGroup("Finance") to verify that Kix is capable of mapping to the drive. In addition to this try using a different drive letter, again to verify that it will map.

If it still fails try the net use command in DOS to verify that the Share path is accessible.

To test the Group Based part do:

If InGroup("Finance")
    ? "Entering If Statement"
EndIf

Which will print out that line.
Avatar of it_gsr

ASKER

when i mapped without the InGroup("Finance"), the map drive worked. That is when i only have this in the logon.kix:

use "m:" "\\bgs-it005\server structure"

Good, no problem with the mapping itself which is great.

Just a matter of checking out that Group name, so try out the following from the command prompt with debug mode:

If InGroup("Finance")
    ? "Entering If Statement"
EndIf

And see if you can get it to check against that group. If not it's back to Active Directory to check its name and such.
Avatar of it_gsr

ASKER

when you run If InGroup(Finance")
    ? "Entering If Statement"
Endif
I get "If InGroup<"finance">. When i press the spacebar again nothing comes. I check with the name in the AD and is the same.

Something is going wrong with that group it seems, it should drop into the If Statement if the Finance Group is correct.

Try with a different group?
Avatar of it_gsr

ASKER

okay,
I am going to try with another group rite now
Avatar of it_gsr

ASKER

This is what i have done now but it seems not to work.

use "g:" "\\bgs-it005\server structure"

If InGroup("Domain Admins")
    use "h:" "\\bgs-it005\server structure$"
EndIf

If InGroup("it")
    use "m:" "\\bgs-it005\server structure"
EndIf


If InGroup("it")
    AddPrinterConnection("\\bgs-it005\hp laserj")
EndIf
Do any of them work?
Avatar of it_gsr

ASKER

none of them works and i am just wondering what actually is going wrong.
Avatar of it_gsr

ASKER


Drives only map after i run the debug for the following in the logon.kix:


If InGroup("it dept")
      use "m:" "\\gsrgh.com\server structure"
Endif

If InGroup("Domain users")
      use "h:" "\\gsrgh.com\bgsgoldcs"
Endif


Avatar of it_gsr

ASKER

Chris-Dent,
Can you help me out?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial