#100522 - 2003-04-24 10:10 PM
MS-Tech Article findings: 318689
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
If we look at Microsoft's page -
A Logon Script Does Not Work If %0 or %0\..\ Calls Multiple Commands
And if you have worked with BATCH files for a while, you would notice that they want you to run the following for NT Machines: quote:
call kix32.exe myscript.scr
Why would you want to "CALL" kix32.exe myscript.scr ?
One of the things that I am seeing on my XP Professional system in our Enterprise is that if you do the following:
quote:
kix32.exe myscript.scr
It fires off the script twice. That seems kind of weird.
I went back to the Microsoft way of thinking and put the CALL Back in and it seems fine.
Kent
|
|
Top
|
|
|
|
#100524 - 2003-04-24 10:38 PM
Re: MS-Tech Article findings: 318689
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Yes.. I use the BAT to call the Kix script.
Kent
|
|
Top
|
|
|
|
#100525 - 2003-04-24 10:43 PM
Re: MS-Tech Article findings: 318689
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
You know...
The more I think about about this.
We should just simply change in AD from -
NTLOGON.BAT
To -
wkix32.exe kixtart.kix
This way, we don't have to worry about distro packages for KiX, Batch files, etc.
Kent
|
|
Top
|
|
|
|
#100527 - 2003-04-25 03:35 AM
Re: MS-Tech Article findings: 318689
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
But..
I think with these exercises, we are able to provide good documentation (FAQ's, answers, etc.) for our fellow scripters.
It is good information.
I have proposed the following change script for users in AD:
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
Thanks,
Kent
|
|
Top
|
|
|
|
#100532 - 2003-04-26 04:55 AM
Re: MS-Tech Article findings: 318689
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Can a Moderator please clean up the language on this posting.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 811 anonymous users online.
|
|
|