#19929 - 2002-04-15 02:33 PM
Location of computer
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
hello
Is there A way to determine a computers location from kix32 or kixtart.
Im booting from a MS -dos floppy.
@ipadress is not working under kixtart ?.
Can I ping diffrent nodes, ?
\erik
|
|
Top
|
|
|
|
#19930 - 2002-04-15 03:44 PM
Re: Location of computer
|
Chris Bingel
Fresh Scripter
Registered: 2002-04-09
Posts: 22
Loc: Baltimore, MD
|
What happens when you try to use @IPADDRESSx?
|
|
Top
|
|
|
|
#19931 - 2002-04-15 04:08 PM
Re: Location of computer
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
macro not reconized \erik
|
|
Top
|
|
|
|
#19932 - 2002-04-15 04:55 PM
Re: Location of computer
|
Chris Bingel
Fresh Scripter
Registered: 2002-04-09
Posts: 22
Loc: Baltimore, MD
|
Are you putting the number at the end?
It's @IPADDRESSx where X = [0-3]
|
|
Top
|
|
|
|
#19933 - 2002-04-15 04:59 PM
Re: Location of computer
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
Working correct under kix32 / version 4.02
code: If @IPADDRESS0 >="x.x.x.x
Is it possible when running MS-Dos
\erik
|
|
Top
|
|
|
|
#19938 - 2002-04-16 09:58 AM
Re: Location of computer
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
Yes TCP/IP is loaded
today using a batch file with multiple choises ex:
"if error level 2 goto sweden"
etc
But I would like it to be automated.
I tried to use kixtart and call simple kix script, and it works OK.
Since @IPADRESS is not working, I thought some kind of ping ? , and then pipe the result etc
Regards
erik
|
|
Top
|
|
|
|
#19939 - 2002-04-16 05:39 PM
Re: Location of computer
|
Jack Lothian
MM club member
   
Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
|
Sorry, I was assuming a setup something like our schools. If one has a distributed network with multiple unique DHCP servers for each unique location then I agree one could use the IP subnet to find the location. In our setup we just have one dhcp server for the whole network so the IP address gives you nothing about the location. I wasn’t thinking in terms of countries, rather, I was thinking in terms of rooms & printers, etc.
I still not sure that I understand the problem. If you are using a boot disk you must know the location because the person using the disk must be physically there. Why can't a simple menu selection set this variable for you? This is what we do. The computer name is constructed from this information plus other info to make it unique. Afterwards, putinenv is used to pull the NIC address for the machine your boot disk is working on & then an association list is created linking the new name, location & NIC address. This is then exported to the server. This creates a permanent association between this machine & its location. Something like this might work for you.
Note that the kxrpc service does not function with DOS boots. Thus LanMan variables (server related info) are not available to kix under DOS. putinenv is an effective replacement for kxrpc. Additionally, all the new functions added to versions 3 & 4 of kix are not available under the DOS version. Thus, I believe that @ipaddress is not available. Ping can get this info though if TCP/IP is used in your boot disk. If you want to save the ping result you must pipe it to a text file & then pull it out with something like string.com. Unfortunately, the text handling capabilities of the 16 bit version of kix are not very good so we find it must be supplemented with DOS utilities like string.com, putenv & a batch INI file editor. Under Windows, with kix versions 4 or higher one can often function without extra utilities but not if you are using the 16 bit DOS version.
Check out this link.
http://www.jsiinc.com/subd/tip1700/rh1786.htm
This is a very good general site for some of this type of info. You might try searching it. [ 16 April 2002, 17:46: Message edited by: JackLothian ]
_________________________
Jack
|
|
Top
|
|
|
|
#19940 - 2002-04-16 05:44 PM
Re: Location of computer
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
What type of network client are you using? If it is msclient from microsoft, which can be found at ftp://ftp.microsoft.com/bussys/Clients/MSCLIENT then you can use the ipconfig.exe utility included to spit out a file. then open the file and read the first line of it, parsing for ip address.
It would work something like this:
shell "ipconfig a:\net > ip.txt" (You may need to modify to you own specs. The A:\NET is assumed lanroot.)
The first line in the file after that is blank. The second line is:
IP Address : xxx.xxx.xxx.xxx .. You should be able to parse the file for the ip address. It also may be possible if you're using DHCP to parse the hidden dhcp.prm file for the same information. The ping method should also work, however I was unable to get ping to run properly within memory constraints on my DOS boot diskette.
Brian
|
|
Top
|
|
|
|
#19941 - 2002-04-19 04:05 PM
Re: Location of computer
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
Sorry for the delay.
Thanks for all the suggestion, but it seems like the manual way is the easy way.
\erik
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|