Hey Guys. I'm building a kixtart script for a client and so far so good. Just want someone to take a look over it and maybe suggest where i could improve on. Also if anybody could lend a hand with maybe building in some error checking and reporting so if a drive doesn't map or if a printer doesn't map or set as default. Been looking through the forums here and not seeing alot of error reporting.

Anyways On to the Script:
 Code:
;Current In Use Drive Letters
; C, D, K, L, P, R, U, V
; Note each time who changed this script and why

;****************************************************************
; Declare Variables Here:

$kixlib = @ldrive\UDF
call $kixlib + "\wshortcut.udf"



;******************************************************************
; Domain Type Mappings

; All Domain Users Get These Drives
if ingroup ("Domain Users")
use y: "\\server12\committee$"
use p: "\\server12\public$"
use u: "\\server12\"+@userid+"$$"
endif

;Super User Access
if ingroup ("SuperUsers")
use h: "\\server12\home$"
use i: "\\server12\departments$"
endif

;AC users
if ingroup ("Acute")
use m: "\\server12\acute$"
endif

;Administration
if ingroup ("Administration")
use m: "\\server12\administration$"
endif

;BO Mappings
if ingroup ("Business Office")
use m: "\\server12\business office$"
endif


;Pharmacy 
if ingroup ("Pharmacy")
use m: "\\server12\pharmacy$"
endif



; End Drive Mappings
;*************************************************************************

;Set  Screen Resolution
if ingroup ("Display")
	if 0=exist ("C:\MultiRes.exe")
		copy "\\@ldrive\multires.exe" "C:\"
	endif
	
	run "C:\multires.exe /1024,768,32,75 /exit"
endif

;**************************************************************************

;Printer Mappings For PC's
$computerprt = left (@wksta, 3)

select 
	case $computerprt = "ACU"
		AddPrinterConnection ("\\server07\main")
	case $computerprt = "AWC"
		AddPrinterConnection ("\\server07\reception")
	case $computerprt = "BO-"
		AddPrinterConnection ("\\server07\BusinessOffice")
	case $computerprt = "HIM"
		AddPrinterConnection ("\\server07\HIM-Main")
	case $computerprt = "LAB"
		AddPrinterConnection ("\\server07\Lab")
endselect
;***************************************************************************

;Check If Current Paragon Installed
if 0=exist ("C:\Program Files\Client93")
	run "\\server\client software\installclient.bat"
endif
if 0=exist ("C:\UpdatesInstalled.txt")
	run "\\server\client software\patches.bat"
endif
;***************************************************************************
; All of the Stuff needed for the training pc's
$training = @hostname

Select
	; CA Test Drive Mappings
	case INSTR($training,"trainingpc")
		? "Training PC"
		use r: /del
		use r: "\\server11\testclm"
		use v: /del
		use v: "\\server11\testdata"
	; Add training Printer
		AddPrinterConnection ("\\server2\training")
endselect

exit


Edited by cjutting (2010-03-06 03:04 AM)