#122669 - 2004-07-12 05:36 PM
Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
I have a Windows 2003 Server with all 9x clients. I'm using Kixtart to be able to make drive mappings based on group membership, so nothing fancy here.
I'm fuzzy on how to make sure kix is running on the 9x machines to translate the special language features. I have the 3 .dll files, kix32.exe and kxrpc.exe in the netlogon directory. Here is my .bat file...
@echo OFF %0\..\kix32.exe
if ingroup ("Teachers") net use y: \\srv\eolsdata if ingroup ("Administrators") net use q: \\srv\eolsdata endif
The login script is running at login, but I am getting a syntax error on the if statements. This allows both drive mapping statements to execute when they shouldn't. I assume this is because KIX isn't running on the machines, and therefore they can't execute the if statement. Any thoughts on what I am doing wrong?
Thanks, Jeremy
|
|
Top
|
|
|
|
#122670 - 2004-07-12 05:46 PM
Re: Installation Questions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Each "IF" requires an "ENDIF". You are missing a "ENDIF". Also have you installed the KXRPC service on your domain controller? Simply placing the kxrpc.exe in NETLOGON is not sufficient. See the manual.
|
|
Top
|
|
|
|
#122671 - 2004-07-12 06:16 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
The service is listed as running on the server, and I have added the endif statements.
When I run the login script, it still says syntax error on the if statements.
The problem still seems to be that the kix software isn't running on the local (machine logging in) machine to translate the statements.
I was thinking that something had to be copied to each machine, so I tried using a sample login.kix that copied the .dll files to the c: drive of the client machine. I edited the login file to reference this .kix file.
@echo OFF
%0\..\kix32.exe %0\..\login.kix
if ingroup ("Teachers")
net use y: \\srv\eolsdata
endif
if ingroup ("Administrators")
net use q: \\srv\eolsdata
endif
however, I get an error saying
Error : unknown command [OFF]!
Script: \\srv\netlogon\login.kix
Line : 1
then the normal login script continues from here.
Edited by Jeremy (2004-07-12 06:18 PM)
|
|
Top
|
|
|
|
#122672 - 2004-07-12 06:25 PM
Re: Installation Questions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Sorry I completely missed the syntax error when reading your code.
NET USE is NOT valid KiXtart code.
net use y: \\srv\eolsdata
should be
use y: '\\srv\eolsdata'
|
|
Top
|
|
|
|
#122674 - 2004-07-12 07:06 PM
Re: Installation Questions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
#122675 - 2004-07-12 07:13 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
I believe I have things further now. I was confusing the difference between the .bat and .kix files. Now things are working, but the drive mappings seem to be intermittent when decending into the.kix login file.
I will work on it for a bit. In the meantime, how do I refer to the username. I would like to map a drive along these lines...
use h: '\\srv\eolsdata\users\%username%'
Thanks, Jeremy
|
|
Top
|
|
|
|
#122677 - 2004-07-12 07:17 PM
Re: Installation Questions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
#122678 - 2004-07-12 07:33 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
My last problem seems to be intermittent mapping. I put a text line in the beginning of the .kix, and I can see it briefly while the login script executes so I know it is decending into the .kix file.
The problem is that sometimes the drives will map, and then after logging out / in again, they will not map. After a few log outs / ins, they will come back for a session or two.
The .kix file is being run every time a user logs in, but if you login as the same user 10j times in a row, the drive only gets mapped about half of the time.
|
|
Top
|
|
|
|
#122680 - 2004-07-12 08:03 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
Right now I am just testing mapping a drive to the main shared folderl. I am using the same destination, but different letters based on group membership. Here is my login.bat followed by the logon.kix file
@Echo Off
CLS ECHO Verifying / Updating Script Software Installation, Please Wait...
IF "%OS%" == "Windows_NT" GOTO WinNT
c:\windows\command\XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM\ /y > NUL c:\windows\command\XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /y > NUL c:\windows\command\XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /y > NUL c:\windows\command\XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /y > NUL c:\windows\command\xcopy %0\..\kxrpc.exe %WINDIR%\SYSTEM\ /y > NUL c:\windows\command\XCOPY %0\..\logon.kix %WINDIR%\SYSTEM\ /Y > NUL ECHO Loading Logon Script, Please Wait... %WINDIR%\SYSTEM\KIX32.EXE %WINDIR%\SYSTEM\logon.kix GOTO End
:WinNT XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL c:\windows\command\XCOPY %0\..\logon.kix %WINDIR%\SYSTEM\ /D /H /I /R /V /Y > NUL ECHO Loading Logon Script, Please Wait... %WINDIR%\SYSTEM32\KIX32.EXE %WINDIR%\SYSTEM32\logon.KIX GOTO end
:End
Here is the .kix file...
"Mapping Drives..."
if ingroup ("Teachers") = 1 "Teacher" use g: '\\srv\eolsdata' endif
if ingroup ("Administrators") = 1 "Administrator" use j: '\\srv\eolsdata' endif
"End Mapping..."
On every login, the "Drive Mapping..." shows up in the login script, but sometimes, you don't get any other text (Teacher, Administrator, or End Mapping), and that is when you don't get the drive mapped. Obviously it never descends into the if statements, but I have no idea why. This is with the same user each time. I am baffled.
Jeremy
|
|
Top
|
|
|
|
#122682 - 2004-07-12 08:09 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
No. Just TCPIP.
|
|
Top
|
|
|
|
#122684 - 2004-07-12 08:23 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
Now it dosen't seem to work at all. Only once or twice in a bunch of tries did it even display the username, and it never mapped a drive. This was between two different machines and trying two different accounts. Would increasing the sleep value make a difference?
|
|
Top
|
|
|
|
#122685 - 2004-07-12 08:56 PM
Re: Installation Questions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You need to methodically add print and WriteLog() statements to track the flow of your script. Output values of variables and include else statements for any IF construct.
Win9x also does not execute logon scripts in a DOS windows interactively. You should logoff and logon again to test properly.
|
|
Top
|
|
|
|
#122686 - 2004-07-12 08:57 PM
Re: Installation Questions
|
Jeremy
Fresh Scripter
Registered: 2004-07-12
Posts: 8
|
I think I may have it. This server is replacing an old domain with a new one, but the NT4 PDC on the old domain is still connected to the network (still pulling data off). Is it possible that domain controllers for two different domain on the same network could cause this problem? Both servers have identical users & groups.
I searched on this problem and found another thread that had ingroup ("domainname\groupname") in sample code. I tried inserting the domain name into the argument, and it seems to be working much better.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|