Author Topic: Kix Script  (Read 3497 times)

SeanPF

  • Zen Monk
  • **
  • Posts: 79
  • Karma: +2/-0
    • View Profile
Kix Script
« on: September 30, 2010, 05:02:00 pm »
I'm having trouble figuring this stuff out. I'm using the latest Zentyal with Windows XP Pro clients. I want a simple logon script to run on all the clients when they log in, but I'm unfamiliar with batch and kix languages.

Can anyone send me the batch code to put into the /home/samba/netlogon folder that will cause kixtart32.exe to run?

And can anyone send a kixstartx.kix script that will
1) map every user to the pulic drive (for instance P: = \\SERVER\Public) upon logon,
2) check the user's group membership and map them to the the appropraite drive (for instance Z: = \\SERVER\Accounting) upon logon, and also
3) map every user to the office printer (\\SERVER\HPMopier)?

Thanks so much in advance!

Jan Jacobs

  • Zen Warrior
  • ***
  • Posts: 132
  • Karma: +1/-0
    • View Profile
    • My blog (dutch)
Re: Kix Script
« Reply #1 on: October 03, 2010, 02:15:52 pm »
this can all be done through simple batch scripting..
look for a logonscrip that includes IsMember.exe from the win2k3 resourcekit
For i dipt into the future far as human eye could see,
saw a vision of the world and all the wonders there would be

SeanPF

  • Zen Monk
  • **
  • Posts: 79
  • Karma: +2/-0
    • View Profile
Re: Kix Script
« Reply #2 on: October 03, 2010, 02:30:37 pm »
Ok I just downloaded the ifMember.exe from Microsoft.

What do I do with this file? Do I simply place it in the netlogon folder of my Zentyal server, and then I can use the ifMember attribute in my batch files?

Jan Jacobs

  • Zen Warrior
  • ***
  • Posts: 132
  • Karma: +1/-0
    • View Profile
    • My blog (dutch)
Re: Kix Script
« Reply #3 on: November 14, 2010, 03:10:48 am »
you should place it in the c:\windows\system32 folder on all your clients
For i dipt into the future far as human eye could see,
saw a vision of the world and all the wonders there would be

eboxbuggy

  • Zen Monk
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: Kix Script
« Reply #4 on: November 14, 2010, 07:47:42 am »
look here:
http://forum.ebox-platform.com/index.php?topic=2019.0

I'm having trouble figuring this stuff out. I'm using the latest Zentyal with Windows XP Pro clients. I want a simple logon script to run on all the clients when they log in, but I'm unfamiliar with batch and kix languages.

Can anyone send me the batch code to put into the /home/samba/netlogon folder that will cause kixtart32.exe to run?

And can anyone send a kixstartx.kix script that will
1) map every user to the pulic drive (for instance P: = \\SERVER\Public) upon logon,
2) check the user's group membership and map them to the the appropraite drive (for instance Z: = \\SERVER\Accounting) upon logon, and also
3) map every user to the office printer (\\SERVER\HPMopier)?

Thanks so much in advance!

Joe

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Kix Script
« Reply #5 on: November 16, 2010, 12:45:00 am »
You can do this with Kix as well.

First, if you create/edit file under Linux, you have to get flip:
Code: [Select]
apt-get install flip
Then, get kix and paste Kix32.exe in /home/samba/netlogon/

Then:
Code: [Select]
nano /home/samba/netlogon/logon.bat
Add this:
Code: [Select]
@ECHO OFF
%0\..\Kix32.exe %0\..logon.kix /f
Save and close, then:
Code: [Select]
flip -m /home/samba/netlogon/logon.bat
Now the Kix's part:
Code: [Select]
nano /home/samba/netlogon/logon.kix
If you have group, you can specify, like this:
Code: [Select]
IF INGROUP("DOMAIN\TheGroup")
USE Z: \\SERVER\Accounting
ENDIF
If you're using the same Drive's letter for each group, make sure to not put an user into more than 1 group or if you do, use a different letter for each share.

And Without groups:
Code: [Select]
USE P: \\SERVER\Public
ENDIF
When, you're done, Save & Close.
Code: [Select]
flip -m /home/samba/netlogon/logon.kix

About your printer, it's like Network drive mapping:
Code: [Select]
IF INGROUP(“\\SERVER\TheGroup”)
ADDPRINTERCONNECTION ("\\SERVER\HPMopier")
ENDIF

And/Or

Code: [Select]
ADDPRINTERCONNECTION ("\\SERVER\HPMopier")

Don't try to use IfMember.exe, because you've to copy it on client and while a simple user log on the domain, it might have no right to use "COPY" from the server to the %SystemRoot%.