Page 1 of 1 1
Topic Options
#124655 - 2004-08-09 04:05 PM @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
i have to connect often to different server on different sites. the script should, based on @lserver or iprange mapping the right shares. i tried in many ways but no result.
ex.
If @lserver = "srv1"
use h: "\\srv1\sys"
Endif
If @lserver = "srv2"
use h: "\\srv2\sys"
Endif
ecc.
seems easy...but whats wrong with it?

thanks for help kurt

Top
#124656 - 2004-08-09 04:11 PM Re: @lserver to connect to different servers in the domain
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
there's nothing wrong with it ... have you checked what @lserver really returns ?
_________________________



Top
#124657 - 2004-08-09 04:20 PM Re: @lserver to connect to different servers in the domain
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
yeah, won't @lserver return "\\srv1" or "\\srv2"
_________________________
Eric

Top
#124658 - 2004-08-10 09:54 AM Re: @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
how do I check that? it returns nothing..
If I run kix32 test.kix (with the code) on the command, there is no message. is upper or lower case important?


Edited by qpix (2004-08-10 09:57 AM)

Top
#124659 - 2004-08-10 10:03 AM Re: @lserver to connect to different servers in the domain
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
try this :

Code:
break on

"Logonserver = -" + @lserver + "-"

get $

exit 1



What does it return ?
_________________________



Top
#124660 - 2004-08-10 10:14 AM Re: @lserver to connect to different servers in the domain
Rory Daniels Offline
Getting the hang of it

Registered: 2003-02-25
Posts: 64
Loc: Bristol, UK
The @lserver macro returns the servername with a \\ prefix so you if statement requires:

If @lserver = "\\srv2"

Not

If @lserver = "srv2"

Rory

Top
#124661 - 2004-08-10 10:24 AM Re: @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
it returns Logonserver = -lserver-
I run the command on the netlogonshare of the server.

Top
#124662 - 2004-08-10 10:26 AM Re: @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
I tried this, but no result.
Top
#124663 - 2004-08-10 10:30 AM Re: @lserver to connect to different servers in the domain
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Quote:

it returns Logonserver = -lserver-
I run the command on the netlogonshare of the server.




You run this on your server ??
Haven't you tried to run this on a client ?
Im a bit confused
_________________________



Top
#124664 - 2004-08-10 10:54 AM Re: @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
just for testing of course. but when I run it from the client, same result.
Top
#124665 - 2004-08-10 01:50 PM Re: @lserver to connect to different servers in the domain
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
This is a fairly simple pieces of code. Something in your environment or your usage must be causing you difficulty. Save the code below into a file call "Test.kix".
Code:
? "Test Script Output"
? @KIX
? "Lserver=" + @Lserver
? "ProductType="+@ProductType



Open a DOS window (Command prompt). Then enter the fully qualified path to your Kix32.exe program followed by a space and fully qualified path of "test.kix".


\\server\netlogon\kix32.exe c:\scripts\test.kix

execute the command.


Post the output of the script to this thread.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#124666 - 2004-08-10 01:57 PM Re: @lserver to connect to different servers in the domain
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah Howard,

somehow this causes me a dejá vu ... and I predict the reply will do that too
_________________________



Top
#124667 - 2004-08-10 02:40 PM Re: @lserver to connect to different servers in the domain
qpix Offline
Fresh Scripter

Registered: 2004-08-09
Posts: 11
Loc: Italien
I finally done it.
If @lserver = "\\srv1" is right. the backslashes must be there.
the other problem was, that the script needed time to be replicated to the different domain controllers. even if the *.kix file was there, there was an error message.
after lunch tried again, and everything works.
thanks again + good work
kurt

Top
#124668 - 2004-08-10 02:47 PM Re: @lserver to connect to different servers in the domain
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Nice !

the return of 'Logonserver = -lserver-' stumped me quite a bit though
_________________________



Top
Page 1 of 1 1


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

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.074 seconds in which 0.033 seconds were spent on a total of 12 queries. Zlib compression enabled.

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