Koozali.org: home of the SME Server

Login Scripts

Tom Veitch

Login Scripts
« on: April 04, 2002, 11:20:21 AM »
If any one Intrested i have setup Kix32 to work with E-smith and all Windows Os

Just send an email and i will send you the files to put into your netlogon folder you then just edit the kixart file to set your company name and any network drives you want mapped. next time the user logs in they will see the Splash screen

Tom

Doug

Re: Login Scripts
« Reply #1 on: April 04, 2002, 10:23:41 PM »
what is kix32?

Tom Veitch

Re: Login Scripts
« Reply #2 on: April 04, 2002, 10:29:53 PM »
KiXtart is a logon script processor and enhanced batch scripting language for computers running Windows XP, Windows 2000, Windows NT or Windows 9x in a Windows Networking environment.

http://www.kixtart.org

david

Re: Login Scripts
« Reply #3 on: April 05, 2002, 01:34:22 AM »
Perhaps you could consider writing a quick "How-To" to show how you have integrated Kix. I'd be interested to see what you have done.

Tom Veitch

Re: Login Scripts
« Reply #4 on: April 05, 2002, 01:56:23 AM »
Kix32 How To

You first download the Kixtart files and unzip then into a folder  

http://www.kixtart.org/bin/kix2001_402.zip

copy the files listed  below from the unziped folder to the netlogon folder on your server
kix32.exe
kixplay.exe
kx16.dll
KX32.dll
KX95.dll
kxrpc.exe
wkix32.exe

then edit the netlogon.bat and add these lines

net use h: /home
@ECHO OFF
if "%PROCESSOR_ARCHITECTURE%"=="" goto 9x
:NT
kix32.exe
:9x
%0\..\kix32.exe
exit

you then need to make the Script file just copy and paste the lines below and save as kixtart.kix

;************************************************************
;** Script:      Login Splash Screen
;** Version:   2.2
;** Created:   Monday - October 9, 2000
;**
;** Author:      Ben Burnett
;** E-mail:      BenBurnett@telusplanet.net
;**
;** Purpose / Comments:
;**
;**      Show the user something nice while they are loged in.
;**
;**      Original splash screen code - Ruud van Velsen
;**
;**      Ben Burnett
;**      - Oct/29/99 - Added Debug information
;**      - Oct/29/99 - Added Company name banner
;**      - Oct/31/99 - Added progress bar
;**      - June/4/2000 - Minor enhancement to debug system
;**
;************************************************************

;************************************************************
;** Script Debuging
;**
;**      On the command line define "$DEBUG=1" to get a
;**      more detailed output. (Without quotes)
;**

;************************************************************
;** Common defines
;**

$TRUE       = 1
$FALSE       = 0
;************************************************************
;** Globals
;**

; Your institutions name goes here
$Title = "Your Company Name"

;************************************************************
;** Script Start
;**

; Turn break on
Break On

; Start of Script
:MAIN
   
   ; Signal start of script
   If $DEBUG = $TRUE
      "*** Start of Script ***" ? ?
   EndIf
   
   ; Set output to ASCII
   Dim $PreviousASCIIState
   $PreviousASCIIState = SetASCII ( "ON" )   
   
   ; Clear the screen
   Cls
 
   ; Show the splash screen
   Gosub SPLASH_SCREEN
   
   ; Progress meter init
   $Progress       = 0
   $FullProgress   = 38 ; 38 is a 'full' bar
   $ProgressPrompt = "Loging in..."
   Gosub DRAW_PROGRESS
   
   ;
   ; Connect network resources
   ;                          
   
   ; Tell the user what were up to
   $ProgressPrompt = "Connecting network resources..."
   Gosub DRAW_PROGRESS
   
   ; Connect up some drives
   use "g:" "\your server name\Ibay name"
   
    
   ; Update progress bar
   $Progress = 10
   Gosub DRAW_PROGRESS      
                                   
   Sleep 2   ; Update progress bar
   $Progress = 20
   Gosub DRAW_PROGRESS
   
   Sleep 1
   
   ; Update progress bar
   $Progress = 30
   Gosub DRAW_PROGRESS

   Sleep 3
   
   ; Update progress bar
   $Progress = 60
   Gosub DRAW_PROGRESS            
      
   ;
   ; TODO: Enter your script here
   ;
            
   ;********************************************
   ; The next few lines is only there so that you can
   ; actualy see the demo screen, in an actual login
   ; script you probably would'nt have them there
   ;
   If $DEBUG = $TRUE   
      
      Color W+/N
      At ( 16,28 ) "Press any key to continue."   
      Get $X
      
   EndIf
   ;********************************************
      
   ; Reset the output mode
   $X = SetASCII ( $PreviousASCIIState )
   
   ; Clear the screen again
   Cls   
      
   ; Signal end of script
   If $DEBUG = $TRUE      
      ? ? "***  End of Script  ***"       
   EndIf
      
Exit ; Quit

;************************************************************
;** Script Subroutines ( GOSUBs )
;**

; Draw screen information
:SPLASH_SCREEN

   ; Background grid
   Color B+/N
   Box ( 0, 0, 24, 79, GRID )         
   
   ; Title banner (institutions name)
   Color B/N
   Box ( 3, 3, 5, Len ($Title + 8) + 5, Å ) ; shadow
   Color G+/N
   Box ( 2, 2, 4, Len ($Title + 8) + 4, FULL ) ; box      
   
   ; Display the institutions name
   Color Y+/N
   At ( 3, 4 ) $Title
   
   ; Information box
   Color B/N
   Box ( 8, 21, 18, 61, Å ) ; shadow
   Color G+/N
   Box ( 7, 20, 17, 60, FULL ) ; box   
   
   ; Display some text strings
   Color W+/N
   At (  9, 25 ) "Userid"
   At ( 10, 25 ) "Full name"
   At ( 11, 25 ) "Privilege"
   At ( 12, 25 ) "Workstation"
   At ( 13, 25 ) "Domain"
   At ( 14, 25 ) "Logon Server"
   
   ; ...and some macro's
   Color Y+/N
   At (  9, 40 ) ": " + @USERID
   At ( 10, 40 ) ": " + @FULLNAME
   At ( 11, 40 ) ": " + @PRIV
   At ( 12, 40 ) ": " + @WKSTA
   At ( 13, 40 ) ": " + @DOMAIN
   At ( 14, 40 ) ": " + @LSERVER
   
   ; Draw the progress bar
   Color B/N
   Box ( 20, 20, 23, 62, Å ) ; shadow
   Color G+/N
   Box ( 19, 19, 22, 61, FULL ) ; box
   Color B/N
   Box ( 20, 20, 21, 60, Å ) ; fill box
   
Return

; Draw progress bar
; NOTE: This will flicker a bit because were re-drawing everithing.
:DRAW_PROGRESS

   ; Find the center of the screen and offset by the progress prompts length
   $YCordinate = 40 - ( Len ( $ProgressPrompt ) / 2 )
   
   ; Clear any previous progress prompt text and bar
   Color B/N
   Box ( 20, 20, 21, 60, Å ) ; erase
   
   ; Display progress prompt
   Color W+/N
   At ( 20, $YCordinate ) $ProgressPrompt
   
   ; Redraw entire progress bar up to new value   
   Color Y+/N   
   Dim $Count
   $Count = 0   
   While $Count <= $Progress
      At ( 21, 21 + $Count ) Chr ( 219 ) ; solid block
      $Count = $Count + 1
   Loop   
      
Return

put this file in to netlogon folder as and it should all work

Rob Thomson

Re: Login Scripts
« Reply #5 on: April 05, 2002, 05:04:20 PM »
Tom
Just tried your howto.
Worked like a charm first time and just what I needed.

Thanks

Regards
Rob

Charlie

Re: Login Scripts
« Reply #6 on: April 06, 2002, 03:09:15 AM »
Interesting. I have a question that maybe you can answer. I gave up trying to get e-smith to be a Windows domain comtroller with my XP computers and am using it as a workgroup server. The only problem I encounter is lost network shares and I have to re-map them occationally. Will the netlogin.bat script run if I connect in a workgroup environement instead of a domain? If so, this could be a great add-in.

Tom Veitch

Re: Login Scripts
« Reply #7 on: April 06, 2002, 04:08:31 AM »
No it wont run as a workgroup

I run Windows Xp on my Sme server running as a domain conrtoller
and the kix system

What was the problem with your xp and sme system

Tom

Charlie

Re: Login Scripts
« Reply #8 on: April 06, 2002, 07:24:46 PM »
> What was the problem with your xp and sme system

I tried all the changes that this forum has stated said to make to get XP to log in to a SME domain but had various nagging problems such as slow log-ins and random log-in refusals. They would happen on different machines at different times. I'm thinking of waiting until a later version of Samba works better with XP.