Kdyer
(KiX Supporter)
2003-05-14 09:24 PM
Batch-less (or remove NTLOGON.BAT) Login script..

This assumes that you have the KIXTART.KIX script already created. Within the documentation, it states that you can execute WKIX32.EXE or KIX32.EXE without having to specify KIXTART.KIX.

Page 11 of the KiXtart Manual (KiX 4.21 RC-2)
quote:

By default, KiXtart automatically looks for a personal script for the current user ("Username.KIX"). If it does not find one, it looks for the default script, "KIXTART.KIX".

Ok.. This is nice, now how do we "migrate" our users from NTLOGON.BAT to WKIX32, for example?

Change script for users in AD (You can change 'Domain Users' to different group as needed):
code:
CLS
BREAK ON
$DomainString='DOMAIN'
$GroupString='Domain Users'
$GroupObj = GetObject('WinNT://' + $DomainString + '/' + $GroupString)
For each $UserObj in $GroupObj.Members
;-Look for the word NTLOGON in case of NTLOGON OR NTLOGON.BAT
IF $UserObj.AccountDisabled<>'True' AND INSTR($UserObj.LoginScript,'NTLOGON')
?$UserObj.Name
?$UserObj.FullName
$UserObj.LoginScript = 'WKIX32.EXE KIXTART.KIX'
$UserObj.SetInfo
$error=@error
$logshare='H:'
$logfile=$logshare+'\'+$DomainString+'CHANGESCRIPT.CSV'
$logdata=$UserObj.Name+','+$UserObj.FullName+','+$error+@CRLF
LOGGER($logfile,$logdata)

ENDIF
Next
?'--'
?'Script complete'
SLEEP 4

FUNCTION LOGGER($logfil,$logdat)
$result=0
$n=0
DO
$result=Open(1, $logfil, 5)
IF $result<>0
IF $n=0
;First wait
?'Please wait'
ELSE
;follow waits
'.'
ENDIF
SLEEP 3
ELSE
$result=WriteLine(1, $logdat)
$result=Close(1)
ENDIF
$n=$n+1
UNTIL $result=0 OR $n=5
ENDFUNCTION



Les
(KiX Master)
2003-05-14 10:17 PM
Re: Batch-less (or remove NTLOGON.BAT) Login script..

You need to however, be aware that Win9x/ME clients cannot run WKiX32 in this fashion.