Page 1 of 1 1
Topic Options
#60121 - 2001-10-27 07:22 AM IP address & registry
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Hi every buddy

Where can I find IP address value in the registry key?
I have a long PC’s list where my script reading deferent data from their registry.

I want to get (read) the IP address within the script instead of ping these PC’s.

Thank you.

Top
#60122 - 2001-10-27 10:50 AM Re: IP address & registry
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello Attiahia,

The macro @IPADDRESS0 will give you the users IP address.

SAMPLE:

code:
SELECT
CASE (SUBSTR(@IPADDRESS0,1,7)) = "126.132"
$MyVariable = "Install"
CASE (SUBSTR(@IPADDRESS0,1,7)) = "126.130"
$MyVariable = "Don't install"
CASE 1
$MyVariable = "Don't install"
ENDSELECT

Please check in the manual and search the board for further assistance and ideas.

Here is a link that talks about getting IP information. IP Address methods

HTH...

[ 27 October 2001: Message edited by: NTDOC ]

Top
#60123 - 2001-10-28 12:41 AM Re: IP address & registry
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Thank you a lot for help.

The link does not work I think, it take me to blank screen.

However, I know the @IPADDRESS0 function but I do not want to use it, instead I want to get the IP Address from the PC registry.

Thank you.

Top
#60124 - 2001-10-28 11:29 AM Re: IP address & registry
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
What is wrong with @IPADDRESS0 ? why don't you want to use it. They will always have one if they have a NIC or Dialup.

I found the IP Address in the following location on a 2000 system.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{503487BA-0B30-42A5-81AD-1E8EAF65F6B3}\Parameters\Tcpip

Top
#60125 - 2001-10-29 01:08 AM Re: IP address & registry
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I presume you want to ascertain the IP address from an addmin script and not a logon script. The location in the registry that holds the IP is named differently on each PC. I suggest you look at another way. If you use DHCP, you can query from it. Likewise, from the WINS DB.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#60126 - 2001-10-29 06:16 AM Re: IP address & registry
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
LLigetfa
As usual you are right, it’s admin script and the location in the registry that holds the IP is named differently on each PC.

My understanding to the DHCP that it’s a server hold some thing like database which include the PC name with the assigned IP to this PC.

If this correct, Can I read this data (PC name & IP) as we used to read from txt file in kix?

I know that there are many options you can set when you configure the DHCP; can we put any option or role to force the users to execute the script on the main domain (even if they did not logged to it)? Is there any code available on this board handle such issues?

I highly appreciate your usual support & I hope to provide me with address for discussion board where they discuss such issue.

NTDOC
Thank you a lot for your help.

Thanks for every buddy.

[ 29 October 2001: Message edited by: attiahia ]

[ 29 October 2001: Message edited by: attiahia ]

Top
#60127 - 2001-10-29 04:24 PM Re: IP address & registry
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Looks like you have a rebellion on your hands. If savy users are avoiding your logon script, perhaps you need to step in their shoes and ask why? Maybe your logon takes too long or is too invasive.

As far as I know, there is no option in DHCP to force users to run a logon script. BTW, to get lease info from DHCP, read the TechNet article "How to Use the Dhcpcmd.exe Tool Included with Support Tools [Q232213]".

To discourage users bypassing your logon script, try to build in dependencies so that if the script doesn't run, they will loose functionality.

I have to ask. How are your users avioding your script?

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#60128 - 2001-10-30 07:07 AM Re: IP address & registry
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Thank you very much for your usual support.

Regarding your question “How are your users avoiding your script” I am calling this script at the end of the main login script, which executed when the users logged in to the main domain.

I can say that 40% of the users do not login to this main domain; instead they login locally to their PC’s.

All what they need from our network is accessing their e-mail where they are authenticated through the exchange domain controller where we cannot place any script as I understood.

The main login script supposes to map the users to specific servers where they can save their data. Since the hard disk space is to big on those users PC’s, they do not want to be mapped to these servers.

Thank you.

Top
#60129 - 2001-10-30 11:37 AM Re: IP address & registry
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hi attiahia,

Looks like you need to get support from upper management to bring these other users in line (or just forget about them).

Best wishes and good luck.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1110 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.137 seconds in which 0.076 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