Page 1 of 1 1
Topic Options
#19929 - 2002-04-15 02:33 PM Location of computer
cellnet Offline
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 Offline
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 Offline
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 Offline
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 Offline
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
#19934 - 2002-04-15 06:24 PM Re: Location of computer
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
No, you can't run Kixtart from within DOS because it's a 32-bit application. You will need the 16-bit version of Kixtart for DOS but I'm not sure whether it supports @IPADDRESS, never used it.
_________________________
There are two types of vessels, submarines and targets.

Top
#19935 - 2002-04-15 07:00 PM Re: Location of computer
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
If you're booting from DOS, are you loading TCP/IP ? if you are then you should be able PING and then do a FIND etc... however if your not loading TCP/IP in the first place, then you have no other good way that I can think of to determine physical location. This begs me to ask though, that if your booting from a floppy (you should already know where you are).
Top
#19936 - 2002-04-16 01:56 AM Re: Location of computer
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Try Using "Putinenv.exe", it retrieves most LanMan variables. I am not sure if it returns IP address though. Why do you need this, won't DHCP assign this randomly. Also, the computer name is defined locally in the protocol.ini file, so you don't need to look it up. Putinenv does return the NIC address though. I believe this might be what you want since it does uniquely define a machine.

If you install the boot disk version of TCP/IP you can use the ping utility as NTDOC says to pull the IP address but as I said I can't see how this helps you locate the machine.

[ 16 April 2002, 01:57: Message edited by: JackLothian ]
_________________________
Jack

Top
#19937 - 2002-04-16 08:18 AM Re: Location of computer
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
JackLothian,

One assumes that if you know the IP address, you also know the physical location of all the subnets that make up your network, or at least you should, and have a map of it.

That is about the only method I can think of that can tell you physical location, but then again, if you're booting from a DOS BOOT DISK you would have to manually do that, and if your doing it manually you or whoever is doing it should know the physical location.

Top
#19938 - 2002-04-16 09:58 AM Re: Location of computer
cellnet Offline
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 Offline
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 Offline
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 Offline
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
Page 1 of 1 1


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

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.063 seconds in which 0.025 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