Page 1 of 2 12>
Topic Options
#70746 - 2002-10-10 05:02 AM logon.bat
Anonymous
Unregistered


I need some help with creating a multipurpose logon.bat.

The problem I am having is we have serveral sites with their own IDS (sub networks type thing) with variation of connection speed.

since we have gone to windows 2000 server, when I update one logon.bat it then gets sent around. of course If I update one thats nice and fast it gets sent to the slower server and of course it points back to the faster server.

is there a way I can set the logon.bat so it knows to use the server its ran from. after looking at the KIX doc I found the %0\..\kix32.exe but of course when I try to use that in my logon.bat it does this

\\Server1\netlogon\logon.bat\kix32.exe

anyone manged to get around this?

Top
#70747 - 2002-10-10 06:05 AM Re: logon.bat
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Get yourself a copy of the ResKit util, NLTEST and see what server is authenticating. You will find that the server that authenticates you is the one the script runs from. Well at least if you call KiX from a bat file with %0\..\ anyway.

I don't know what clients you have but the bat files and %0\.. thingy is only needed for Wintendos.

You can use some of the subnet UDFs to ascertain in what subnet the client is in and then CALL a subscript from the nearest (fastest) server. If you have Win2k clients you can also set the preferred DC.

You really need to paint a better picture if you expect to get any quality help.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#70748 - 2002-10-10 07:16 AM Re: logon.bat
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Bonky,

Have a look my second to last response on this topic..

I cover a bit on a re-write of the NTLOGON.BAT..

Deployment of Kix Scripts

It is significantly trimmed down from our previous version.

Does this help?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#70749 - 2002-10-11 04:16 AM Re: logon.bat
Anonymous
Unregistered


when I update the logon.bat to four of our servers (2000 servers) I try to balance kix to pick up and run the script from that server its being used.

Because 2000 replicates the logon.bat to all of the servers eventually it points to the ONE server casuing a bottle neck coz its no longer balanced.

is there away to put a variable into the logon.bat so it actually picks up the server its being ran from? rather than a fixed server?

as I tried to explain i saw the %0 but that seems to put in the "\\server\netlogon\logon.bat"

has anyone got a simlar sutiation of having a few servers with this kinda problem?

Top
#70750 - 2002-10-11 05:12 AM Re: logon.bat
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well %0\ references the server that authenticated you. If all four have the potential to authenticate then you have quasi load balancing. Use NLTEST to see which server will authenticate.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#70751 - 2002-10-11 06:05 AM Re: logon.bat
Anonymous
Unregistered


Ok.. so show me an example using NLTEST, (please)
Top
#70752 - 2002-10-11 06:27 AM Re: logon.bat
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
bonky,

Don't have an example, but...

Do these help?

http://support.microsoft.com/default.aspx?scid=KB;EN-US;q158148&

http://windows2000.about.com/library/weekly/aa010200b.htm

http://jakesdesigns.1st.net/ADTools.htm

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#70753 - 2002-10-11 06:48 AM Re: logon.bat
Anonymous
Unregistered


I need to some how via BATCH file .. work out what server the LOGON.BAT is being ran from..

capture that information and replace it with a %1 type parm. with in the logon.bat

That way I can happy let windows do its thing (replicate)

Top
#70754 - 2002-10-11 06:57 AM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bonky, could you do some sort of test part for us?
add to the script the macro's @lserver and @scriptdir.

show them out or put into file. anyway, that way you can be sure that if %0\..\ fails or not.

I rather think that if you have allways %0\..\ from same server, it's your netlogon services that are causing grief.
 
_________________________
!

download KiXnet

Top
#70755 - 2002-10-11 07:20 AM Re: logon.bat
Anonymous
Unregistered


I use the LOGON.bat to call kix32 logon.kix

so I cant do the @ commands...

the %0 gives me a line like this

\\server\netlogon\logon.bat

so I cant use the %0 (unless you can tell me a way to shorten it!?)

Top
#70756 - 2002-10-11 08:37 AM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bonky, if you use it like we have shown you:
%0\..\ it will turn out as:
%0\ - the fully qualified path
.. - one up
\ - dir

so parsing from \\server\share\logon.bat
one up gives you \\server\share
and then \ makes it \\server\share\

so calling your script with:
%0\..\kix32

is just the same as:
\\logonserver\logonshare\kix32

I did not mean to ask you use those macros in the batch but in the script as you told that %0 is giving the same value on all servers, which I didn't buy...
 
_________________________
!

download KiXnet

Top
#70757 - 2002-10-11 09:23 AM Re: logon.bat
Anonymous
Unregistered


Thanks for the reply... I did retry that %0\..\ (i slightly misunderstood what was going on there)

I tried %0\..\ the results I got was

'\\server\NETLOGON\logon.BAT\..\'

My command line was (in logon.bat)

echo.
echo %0\..\
echo.

Top
#70758 - 2002-10-11 09:29 AM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ah!

get it, you have xp client, don't you?

I think there is one topic in the faq descriping this.
the %0 is placed in quotes in xp and it's uncompliant with other windows releases.

so, for windows xp you would call the same line with just:
kix32 script.kix

actually, this is supported already by nt and w2k.

so, only thing you must take care of is the win9x clients which still need the %0 or z:\ (%0 is for current path which is during logon the netlogon folder and z:\ is automatically mapped on win9x to netlogon folder during logon)

for testing purposes you can make a simple bat which has only:
kix32 script.kix

if you still have those old win9x clients there, check on the faq how to separate them from the real network os'es...
 
_________________________
!

download KiXnet

Top
#70759 - 2002-10-11 10:13 AM Re: logon.bat
Anonymous
Unregistered


Well... yes.. but it is doing on win9x as well! 8(
Top
#70760 - 2002-10-11 10:14 AM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it is doing...

do you mean that you get with win9x:
'\\server\NETLOGON\logon.BAT\..\'
???
_________________________
!

download KiXnet

Top
#70761 - 2002-10-11 10:23 AM Re: logon.bat
Anonymous
Unregistered


Yes.. that is correct!...

Im not sure why its doing that...

Top
#70762 - 2002-10-11 10:30 AM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, try with this type of call:
code:
if "%OS%" == "Windows_NT" goto NT
z:\kix32 z:\script.kix
exit
:NT
kix32 script.kix

_________________________
!

download KiXnet

Top
#70763 - 2002-10-11 02:34 PM Re: logon.bat
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
NLTEST has nothing to do with KiX or LOGON.BAT but rather is a diagnostic tool to see what logon servers respond to a request. If %0\..\ allways resolve to the same server then that one server is the only server responding to the request.

That then is not a KiX issue but rather an OS issue.

As for when to use %0\..\, only Wintendos need it so you need to ascertain the OS within the LOGON.BAT and branch accordingly. There are a lot of examples on the board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#70764 - 2002-10-11 02:37 PM Re: logon.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
les, Like the one above?

what comes to %0\..\
it's pretty weird that he gets it same way on win9x as normally comes out on xp...
_________________________
!

download KiXnet

Top
#70765 - 2002-10-11 03:44 PM Re: logon.bat
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
%0\..\ is behaving absolutely correct. However, if you want to identify the authenticating logon server inside KiXtart then you want to use @LSERVER. And with regards to the different logon servers, the logon script will run from the logon server that first responds to a logon request.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 2 12>


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1188 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.07 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org