;=========================
;Map Network Drives
;=========================
If InGroup("_Drive_S_Drive")
Use S: "\\SERVER\Data"
EndIf
If InGroup("_Drive_P_Drive")
Use P: "\\SERVER\Public"
EndIf
;=========================
;Map Printers
;=========================
If InGroup("_Printer_HP_M1522
ADDPRINTERCONNECTION ("\\SERVER\HP Laserjet M1522NF")
EndIf
If InGroup("_Printer_HP_P2014
SHELL 'con2prt /cd "\\SERVER\HP Laserjet P2014N"'
EndIf
save the above code in connect.kix file and read the following guide
If InGroup("_Drive_S_Drive")
Use S: "\\SERVER\Data"
EndIf
\\SERVER\Data - is Share path
This means it will map the S:\drive if the user is part of the "_Drive_S_Drive" security group in Active Directory. This is helpful if you are wanting to map a network drive based on a user's security group membership. Therefore, if they are not part of that group, that drive doesn't get mapped for them. If they try to map it manually, it won't let them because you would have put security on that share.
**************************
If InGroup("_Printer_HP_M1522
ADDPRINTERCONNECTION ("\\SERVER\HP Laserjet M1522NF")
EndIf
This means it will map the printer (HP Laserjet M1522NF) if the user is part of the "_Printer_HP_M1522NF" security group in Active Directory. This is helpful if you are wanting to map a printer based on a user's security group membership. Therefore, if they are not part of that group, that printer doesn't get mapped for them. If they try to map it manually, it won't let them because they won't have the permissions to. You can also change the group to be "Domain Users" instead. Then add all printer shares to it. What that then means is everyone will automatically get all the printers in their organisation mapped for them during login.
**************************
If InGroup("_Printer_HP_P2014
SHELL 'con2prt /cd "\\SERVER\HP Laserjet P2014N"'
EndIf
This means it will set the HP Laserjet P2014N printer as the users default printer if the user is part of the "_Printer_HP_P2014N" security group in Active Directory. This calls on the con2prt executable to connect to that printer and set it as the users default printer. More information about the con2prt tool can be found here - con2prt.exe - Map, delete, and set default printer. This is helpful if you want to automatically set a user's default printer for them. It works well if you create this for all your printers and add users to their appropriate group. Then, if the user moves to a different location in the building and needs a different printer as their default, just add them to the other printer group.
The easiest way is in your normal login script, call on the kix file. The example kix file mentioned on page 1, I save as connect.kix. What I then do is create a login.bat batch file (or you can modify your existing login batch file) and in that file, include this one line:
%0\..\kix32 %0\..\connect.kix
The line above just calls on the KIX32.exe program (which also needs to be installed on the same location as the login.bat file, generally on the servers's NETLOGON share) to run the connect.kix file
you can down load the sample kix file and KIX32.exe and con2ptr.exe from following link
http://thisishelpful.com/p
Main Topics
Browse All Topics





by: wiscomPosted on 2009-08-11 at 07:46:34ID: 25069677
Hi,
.com/
Try this one : FastTrack Scripting Host
FastTrack Scripting Host is a complete replacement for VBScript/WSH, Bat files, PowerShell and all other scripting tools. Once you tried FastTrack, you will never use any of them again. You can create logon scripts, install scripts, backup scripts, administrative tasks and anything else you use scripts for with awesome end-user GUI, easier than you could ever imagine! You don't need programming skills and you don't need to deploy anything to the clients. Your scripts will be very easy to read and will be less than 10% in size of what you already have. If you think this is too good to be true, just download it and try it out yourself! Find out why we already serve more than a million workstations.
http://www.fasttrackscript
You can download a full trial version !!!
Go for it.
A/