;*****************************************************
; SLISI STAFF Login Script
;*****************************************************
; Author:
; Date: 22/10/04
; Format: KIX
; Description: SLISI Staff Login script
; Last Modifed Date:
;
;*****************************************************
;SETUP KIXSCRIPT ENVIRONMENT
;*****************************************************
SetTitle ("Sun Life Ireland Login Script")
cls
Color w+/n
? "Sun Life Ireland Login Script on " @MDAYNO"/"@MONTHNO"/"@YEAR " at " @TIME
?
;*****************************************************
;Declare Global Variables
;*****************************************************
GLOBAL $DDMMYYYY, $MyIP, $MySubnet, $LogonType, $MyPriv, $MyMachineType
;*****************************************************
;Set Global Variables
;*****************************************************
$DDMMYYYY = DDMMYYYY
$MyIP = MyIP
$MySubnet = MySubnet
$LogonType = LogonType
$MyPriv = MyPriv
$MyMachineType = MyMachineType
;*****************************************************
; This enables a Crtl/Break without rebooting.
;*****************************************************
; Break on
;*****************************************************
; Run Script in debug mode if user is a member of "LOGIN_SCRIPT_DEBUGGER" global group
;*****************************************************
IF INGROUP("LOGIN_SCRIPT_DEBUGGER")
DEBUG ON
ENDIF
;*****************************************************
; Create a local logon.log file on users C: drive and redirect all output to this file
;*****************************************************
If $logontype = "Local"
IF RedirectOutput("C:\logon.log", 1 ) <> 0
? "Error Logging Script Results to 'C:\logon.log' @error - @serror" ?
ELSE
? "Login Script Results logged to 'C:\logon.log'" ?
ENDIF
ENDIF
? "Sun Life Ireland Login Script on " @MDAYNO"/"@MONTHNO"/"@YEAR " at " @TIME
;*****************************************************
; Welcome User
;*****************************************************
?
? "You are logged on to the " @LDomain " domain as User: " @UserID
?
? "*****************************************************"
? "User and Host computer Information"
? "*****************************************************"
?
? "Hostname: " @WKSTA
?
? "IP Address: " $MyIP
?
? "Location: " $MySubnet
?
? "Machine: " $MyMachineType
?
? "Logon Type: " $LogonType
?
? "User Privileges: " $MyPriv
;*****************************************************
;Log user and workstation information to central logfile location on the network
;*****************************************************
$logshare= "\\sv4103\Software\Reports\Login"
$logfile= "$Logshare\$DDMMYYYY.LOG"
$logdata= "@MDAYNO/@MONTHNO/@YEAR,@TIME,@WKSTA,@ProductType,@FULLNAME,@USERID,$MyPriv,@LSERVER,$MyMachineType,$MySubnet,$MyIP,@ADDRESS,$LogonType"
?
$null = Loginfo($logfile,$logdata)
?
;Run "c:\program files\internet explorer\IEXPLORE.exe http://www.google.ie/"
;Run "c:\program files\internet explorer\IEXPLORE.exe http://thesource-redirect.ca.sunlife/"
;*****************************************************
; Skip rest of script for all Citrix and Term Serv (Application mode) clients
;*****************************************************
If $logontype = "Citrix Metaserver or Terminal Services in Application mode"
GOTO END
ENDIF
;*****************************************************
;DETERMINE ACTIONS BASED ON OS
;*****************************************************
$OSVal = @PRODUCTTYPE
SELECT
;*****************************************************
; Actions for Windows Server Operating Systems ONLY
;*****************************************************
CASE ( (INSTR ($OSVal,"Server") <> 0) OR (INSTR ($OSVal,"Domain Controller") <> 0) )
?
? "Running Windows NT/2000/2003 Server KiXtart Login Script"
?
;*****************************************************
;Actions for Windows XP Professional or 2000 Professional ONLY
;*****************************************************
CASE (LEFT(@PRODUCTTYPE,10) = "Windows XP") OR (@ProductType = "Windows 2000 Professional") OR (@ProductType = "Windows 7")
? "*****************************************************"
?
? "Running Windows 2000/XP Workstation Login Script"
?
? "*****************************************************"
? "Mapping Drives for user @USERID..."
? "*****************************************************"
;ADD STANDARD DRIVE MAPPINGS FOR ALL Authenticated USERS
MAPDRIVE ("J:","SV4103","Slisishare")
MAPDRIVE ("L:","SV4101","Slisiapps")
MAPDRIVE ("M:","SV4102","Dept")
MAPDRIVE ("S:","SV4103","Software")
;ADD Personal DRIVE MAPPING FOR ALL Authenticated USERS
MAPDRIVE ("P:","SV4102","Slisiprivat\@USERID")