Page 1 of 1 1
Topic Options
#32536 - 2002-11-15 01:28 PM Hello everybody...
French_Opposum Offline
Fresh Scripter

Registered: 2002-11-15
Posts: 7
First, I apologize for my grammar (I'm French..) [Smile]

I made a search but i didn't found any answers to my questions, so i create a new topic. Please don't kill me if i missed the solution! [Big Grin]

250 workstations( desktop computer and portable), OS Win9x and Win2K
I have to change all Ip config (IP,Subnet,Gateway,WINS) with a script.

the goal of the play:
change 192.168.25.x / 255.255.255.0
to 192.168.50.x / 255.255.0.0

(idem for gateway, wins: 192.168.25.x > 192.168.50.x)

then shutdown pc for apply change (users should of course turn on after..)

(i add that ours server will be set in the right ip config before, for correct login)

Thx a lot [Smile]

Top
#32537 - 2002-11-15 01:48 PM Re: Hello everybody...
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
French,

Welcome on Board...

Question: why not use DHCP? Changing 250 stations to use DHCP can be done manually with e few hands extra in a short time [Wink]

Take a look at the UDF forum on how to use User Defined Functions and determining IP addresses (sorry can't help you with exact topics since my search doesn't work at the office).

I know there are some to determine if you're in an IP-range too!

Changing however will be difficult on W2k; Admin rights are required! You could use SU for this (see the FAQ forum).

Win9x should be easy using readvalue and writevalue (search the reggie manually to determine the keys and write a script to change them).

Hope this helps a little...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#32538 - 2002-11-15 01:49 PM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
next question is that what rights the users have on the w2k machines?
they don't have rights by default to change this so if you have not later added the rights, you would need to:
a) create admin script which scans all computers changing the settings and asking user to reboot
b) use su or other util to run as admin (security conserns) while logging on

and, ofcourse will not shoot you.
you even picked the right forum and all. [Wink]
reading your post shows that you have readen many posts before posting this, right? [Eek!]
_________________________
!

download KiXnet

Top
#32539 - 2002-11-15 02:22 PM Re: Hello everybody...
French_Opposum Offline
Fresh Scripter

Registered: 2002-11-15
Posts: 7
Lonkero >>
Thx for answer so far!
My W2K users are admin on local (not on domain of course [Wink] ) so there are no difficulties to apply a script under user's rights.

(and yes, i read many posts before make this [Big Grin] , but i'm still searching)

MightyR1 >>
[Frown] i can't use DHCP because:

1] flexibility with my firewall which manages users by IP

2] my users are globaly nomad (portable), so: a lot of conflicts when users come back on the LAN after 2 months of absence (Ip released and reaffected > ip conflict)

3] Global politic of my Office, i can't change it right now, but i have to change IP right now.. (we are about to be more than 255 users )

Both of you:

My difficulties are:

change only 25 to 50 in 192.168.25.x without change "x" (arggg) , in @IP,Subnet,etc..

shutdown W9x ! (rundll32; ExitWindows make only a reboot, i must turnoff completely portables to affect change because of PCMCIA Cards)

So.. any solutions? [Big Grin]

if you find a solution , i'll pay you a Mercedes
(no, it's a joke: only a big thx [Big Grin] )

[ 15. November 2002, 14:24: Message edited by: French_Opposum ]

Top
#32540 - 2002-11-15 02:26 PM Re: Hello everybody...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You definitley have not searched enough. Otherwise you might have noticed CheckNICs - Checks a NIC for correct TCP/IP settings , which checks NICs against a series of IP parameters in a static IP environment.

Additionally, searching the KiXtart BBS as outlined in Cannot find what you are looking for? with e.g. keywords 'change gateway' give me a lot of threads discussing IP configuration chnages.
_________________________
There are two types of vessels, submarines and targets.

Top
#32541 - 2002-11-15 02:36 PM Re: Hello everybody...
French_Opposum Offline
Fresh Scripter

Registered: 2002-11-15
Posts: 7
Dear SeaLeopard,

I noticed "CheckNICs", of course.
But i'm still confused: how to only change 25 to 50 in 192.168.25.x ? [Confused]

Moreover, I know how to search with booleen, etc..

I precise that I am not an expert in scripts.

Top
#32542 - 2002-11-15 02:43 PM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
for the join to work, you need kix 4.10 RC-1 or higher

$currentIP="192.168.25.x"
$currentIP=split($currentIP,".")
$newIP=$currentIP[0],$currentIP[1],"50",$currentIP[3]
$newIP=join($newIP,".")
"changed IP:" ?
$newIP
_________________________
!

download KiXnet

Top
#32543 - 2002-11-15 02:44 PM Re: Hello everybody...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Read IP address, split IP address into it's four octets, Replace third octet, reassemble IP address
code:
$ips=split(@IPADDRESS0,'.')
for each $ip in $ips
$ip=trim($ip)
next
$ip[2]='50'
$ip=join($ips,'.')

Corrected code [Wink]

[ 15. November 2002, 14:50: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#32544 - 2002-11-15 02:46 PM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens...
shouldn't:
$ip[2]='50'

be outside the for each?

[ 15. November 2002, 15:36: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#32545 - 2002-11-15 02:51 PM Re: Hello everybody...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
French,
You can use DHCP and still assign specific IPs to clients. It's called DHCP reservations and I use them on my network. You can script the additions of the reservations as well.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32546 - 2002-11-15 03:31 PM Re: Hello everybody...
French_Opposum Offline
Fresh Scripter

Registered: 2002-11-15
Posts: 7
SeaLeopard: one question, one answer: you're the best [Wink] thx a lot

Lonkero: yes, i think it's [3] [Big Grin]

i try it right now.

Top
#32547 - 2002-11-15 03:38 PM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
no, it is two.
if you check jens code and mine above that, you will see that the octets count is starting from 0 so third octet is 2.
_________________________
!

download KiXnet

Top
#32548 - 2002-11-15 03:41 PM Re: Hello everybody...
French_Opposum Offline
Fresh Scripter

Registered: 2002-11-15
Posts: 7
[Big Grin] yeah i just saw it
Top
#32549 - 2002-11-15 11:38 PM Re: Hello everybody...
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
French,

you're right, me too discovered that runddl isn't reliable to shutdown W95. We use a freeware shutdown.exe I found somewhere on the web...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#32550 - 2002-11-15 11:42 PM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
pat, is that different from the m$ version?
_________________________
!

download KiXnet

Top
#32551 - 2002-11-15 11:58 PM Re: Hello everybody...
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
dunno...

shutdown.exe from helpdesk.kixtart.org came from NT4 reskit, didn't test it on W9x though. If desired can do so tuesday...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#32552 - 2002-11-16 12:02 AM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are one of the guys who does not "need" to work on monday, eh?
_________________________
!

download KiXnet

Top
#32553 - 2002-11-16 12:34 AM Re: Hello everybody...
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Yep,

working?? Present only on tu-, we-, th-, fr-day; hardly any overtime, no standby...

Oh life's great isn't it!!!

PS. sometimes you'd catch me on mondays if you're quick enough, but no more than 36 hrs a week!!!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#32554 - 2002-11-16 12:55 AM Re: Hello everybody...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
pat, if you checked that link, my MONTH consist nowadays of 1-80 hours...
quote:

jooel, you are ok dude but too expensive

_________________________
!

download KiXnet

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.03 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