Logon.bat
code:
 ECHO OFF
CLS
REM detect the operating system and go to the appropriate segment
VER | find "NT" > nul
IF not errorlevel 1 GOTO Win_NT
VER | find "2000" > nul
IF not errorlevel 1 GOTO Win_2K
VER | find "XP" > nul
IF not errorlevel 1 GOTO Win_XP
VER | find "98" > nul
IF not errorlevel 1 GOTO Win_98
VER | find "95" > nul
IF not errorlevel 1 GOTO Win_95
VER | find "Millennium" > nul
IF not errorlevel 1 GOTO WIN_ME
GOTO DOS
REM client is running DOS
:DOS
ECHO.
ECHO No Login Script Available For DOS Clients
ECHO.
GOTO End
REM client is running Windows 9x
:Win_95
:Win_98
:Win_ME
%WINDIR%\COMMAND\XCOPY %0\..\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\KX*.DLL %WINDIR%\ /D /H /I /R /V /C >NUL
GOTO RunScript
REM client is running Windows NT/2000/XP
:Win_NT
:Win_2K
:Win_XP
ECHO y| XCOPY \\sussex1\\NETLOGON\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL >NUL >NUL

GOTO RunScript
:RunScript
%WINDIR%\KIX32.EXE \\sussex1\\NETLOGON\Kixtart.KIX

GOTO End
:End

CLS
EXIT 0

Kixtart.kix

code:
;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 2/24/2003 at 11:47:08 AM by mmontgomery ****
; Revised By Matthew T. Montgomery (mmontgomery@sussexcounty.net)

;? 'Error = '+@ERROR+' - '+@SERROR
;Error checking per line

;***************************************************************************************************************************
;Copy Kix32.exe and My Computer Information.kix Shortcut To The Client PC's Desktop - For Windows 2000
;***************************************************************************************************************************

;MD c:\Kixscripts
;If NOT Exist('c:\Kixscripts\kix32.exe')
;Copy '\\sussex1\netlogon\Kixtart\kix32.exe' 'c:\Kixscripts'
;EndIf
;If NOT Exist('c:\Kixscripts\My Computer Info.kix')
;Copy '\\sussex1\netlogon\Kixtart\My Computer Information.kix' 'c:\Kixscripts'
;EndIf
$desktop = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
If NOT Exist('$desktop\My Computer Information.lnk')
Copy '\\sussex1\netlogon\Kixtart\My Computer Information.lnk' '$desktop'
EndIf


;******************************************************************************
; Check the following key for W2k Machines to make the window not run minimized
;******************************************************************************

If @dos >= "5.0"
$hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE'
If 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
EndIf
EndIf

;************************************************************
;Windows MessageBox To Greet The User And Display Information
;************************************************************

MessageBox(" Hello @FULLNAME - today is @DAY @MDAYNO @MONTH

*** You are logging onto the @DOMAIN Domain ***
Your current user rights are @Priv
Your Password will expire in @PWAGE days.
Host Name: @HOSTNAME
IP address: @IPADDRESS0

Your System Specifications = @PRODUCTTYPE, @MHZ Mhz @CPU","Sussex Domain Logon",64,5)

; ------------------------------------------------------------------------
; @MHZ = processor speed
; @CPU = processor type
; @TIME = curent time
; @fullname = shows users full name as entered on Server logon credentials
; @wksta = workstation name as entered on the local PC
; ------------------------------------------------------------------------

;***********************************
; Synchronize Time From "Sussex-DC1"
;***********************************
SetTime "\\SUSSEX-DC1"

;*****************
;Clears The Screen
;*****************
CLS

;***************************************************
;Disables The Ability To Interrupt The Script Window
;***************************************************
Break off

;***********************************
;Deletes all currently mapped drives
;***********************************
Use "*" /DELETE

;*******************************************
; Network Drive Mappings by Group Membership
;*******************************************
If InGroup('Domain Users')
? 'I: (\\Sussex-FS-1\General)'
Use I: '\\Sussex-FS-1\General'
? 'P: (\\Sussex1\Users\@USERID)'
Use P: '\\Sussex1\USERS\@USERID'
? 'S: (\\Sussex1\Shared)'
Use S: '\\Sussex1\Shared'
EndIf

If InGroup('Information Systems')
? 'W: (\\Sussex-FS-2\Information Systems)'
Use W: '\\Sussex-FS-2\Information Systems'
EndIf

If InGroup('Mapping And Addressing')
? 'G: (\\Sussex1\Global)'
Use G: '\\Sussex1\Global'
? 'R: (\\Sussex1\ReAddressing)'
Use R: '\\Sussex1\ReAddressing'
? 'V: (\\Sussex1\View)'
Use V: '\\Sussex1\View'
? 'Z: (\\Sussex-fs-1\Aerial_Photos)'
Use Z: '\\Sussex-fs-1\Aerial_Photos'
EndIf

;************************************
;Printer Mappings by Group Membership
;************************************
If InGroup('Information Systems')
$RC=AddPrinterConnection("\\Sussex-DC2\IS HP LaserJet 4100tn")
If $RC=0
? "Adding printer, IS HP LaserJet 4100tn"
$RC=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
If $RC=0
? "Adding printer, IS HP Color LaserJet 4500"
Else
? "$$RC = "+$RC
? "@@Error = "+@Error
? "@@SError = "+@SError
EndIf
EndIf

;**********************************************************************************************
; Checks for Exchange Server Profile, If Not, Creates One (Tested On Windows 2000 Professional)
;**********************************************************************************************
$Index = 0
$keyfound = 0

$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles"
If (KeyExist($search_location) = 1) ; 1 if found
$KeyName = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $Index)
While @ERROR = 0
$keyfound = $keyfound + 1
$Index = $Index + 1
$KeyName = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $Index)
Loop
Else
$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
If (KeyExist($search_location) = 1) ; 3 if found
$KeyName = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $Index)
While @ERROR = 0
$keyfound = $keyfound + 1
$Index = $Index + 1
$KeyName = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $Index)
Loop
EndIf ; 3 if end
EndIf ;1 if end


If $keyfound = 0
$createprofile = @LSERVER + "\NETLOGON\Profgen.exe " + @LSERVER + "\NETLOGON\Newprof.exe -P " + @LSERVER + "\NETLOGON\Custom.prf -X -R -L"
Run $createprofile
? "Email profile created"
; profgen.exe, newprof.exe and custom.prf can be found at http://www.microsoft.com/downloads/search.asp? in a file called idk99.exe
; or email noelh@clara.net for the files.
EndIf

;********************************************************
;Script Window Stays Focused For Specified Amount Of Time
;********************************************************
Sleep 2 ; Wait for 5 sec

;***********************
;Exits The Script Window
;***********************
Exit