Page 2 of 2 <12
Topic Options
#26249 - 2002-07-31 09:10 PM Re: IP detection in a batch file
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Guys -
One possible variation to look for is subnet mask. Depending upon masking, the 10.x network may be unique in relation to other networks, in which case the gateway or addresses including '10.0', such as '192.168.10.0' would not matter. Modifying the collected wisdom already posted:

ipconfig | find /i "subnet mask" | find "255.255.0.0"

Also, Chris - IPCONFIG will work on Win98 boxes - I am using now in KiX file related to problem of subnet masks being changed, so must manually run reset/renew. As for the FIND command working on Win98 as the above command is structured, unsure, have not tested yet.

Bill

[ 31 July 2002, 21:13: Message edited by: bleonard ]

Top
#26250 - 2002-07-31 09:15 PM Re: IP detection in a batch file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It's interesting how we get details late in the thread that invalidates everything we've suggested. Chris is right, that IPCONFIG would only work on NT.

I agree with Jens. Run KiX from \NetLogon and do all the checks from there. Nothing need be installed on the workstation at that point.

Even if you did install KiX on a process machine, what would that matter? Unless they use KiX for other than logon scripts it wouldn't hurt. I mean, it's just one or two files.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#26251 - 2002-07-31 09:24 PM Re: IP detection in a batch file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bill, the subnet mask can be same for all subnets no matter what is the ip or actual subnet.

and when used with ": 10.0" it can never be nothing else than start of the address.
_________________________
!

download KiXnet

Top
#26252 - 2002-07-31 09:26 PM Re: IP detection in a batch file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Les:

They might have some kind of change-management in place or multiple IT department and little turf wars.

Other than that, yeah, the KiXtart-from-NETLOGON solution is definitely the most flexible one, even if requirements change later on.
_________________________
There are two types of vessels, submarines and targets.

Top
#26253 - 2002-07-31 10:37 PM Re: IP detection in a batch file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually, if the company policy or something else comes in the way of installing kix locally, the absolutely best solution would be using kix from netlogon.

only case this might not work too well is when you have reeeeally slow net connections.

but then you could also inform users and boss'es that if you put kix to local system the script runs lot faster and this way you would also lastly get it to wksta installs.

I've learned that when force is with you, you can do lots of thinks you would have not even imagined [Big Grin]

like, I don't have anymore win9x machines on our net, thanks to "forcing"
_________________________
!

download KiXnet

Top
#26254 - 2002-08-01 01:35 AM Re: IP detection in a batch file
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Lonkero - I best adjust my monitor resolution as I did not see the colon character. You are of course correct.

LLigetfa - I am running IPCONFIG on approx 150 Win98 machines, so it clearly does run on Win98. MS includes 'ipconfig.exe' as part of the standard Win98 networking installation, and it exists in %windir%. The file dates and sizes and dates are different between the versions on my NT (11/99 22kb) and 98 (04/99 52kb) systems. I would be happy to send the 98 version to anyone wishing to see this further.

Bill

Top
#26255 - 2002-08-01 04:41 AM Re: IP detection in a batch file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Bill,
I'll have to take your word on it as I've banned '98 from my network. I can say that IPCONFIG doesn't work on Win95 machines. foomanchoo doesn't say for certain he's got win95 but does say perhaps.
quote:
:WIN9x
echo You are NOT running Windows NT (Windows 95/98 perhaps?)

A partial solution is no solution.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#26256 - 2002-08-01 02:43 PM Re: IP detection in a batch file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so we probably should also add routines for reinstalling windows (from 9x to NT-based) if no ipconfig found, right?
_________________________
!

download KiXnet

Top
#26257 - 2002-08-01 03:01 PM Re: IP detection in a batch file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jooel,
I'm taking the same tough approach as you on Wintendo. No fixes, no updates, no support. I want them all gone. Every sick Wintendo we come across gets scrubbed and Win2k installed.

When the last Wintendo is gone, then I'll migrate my NetWare to Win2k AD.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#26258 - 2002-08-01 04:28 PM Re: IP detection in a batch file
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
It's nice to have the ability to ban such Win9x O/S's from your network. However, in my environment we have some custom mission critical apps that can not run under WinNT, and have some problems under WinXP/2K. Therefore, the chuck it all or do not support approach can not work for me, and may or may not work for others on this board.

Bill

Top
#26259 - 2002-08-01 04:34 PM Re: IP detection in a batch file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Unfortunately,the same is true for me. We have some (partially custom-written) data acquisition software/hardware that only works under DOS or Windows 9x. Thus, can't get rid of them.
_________________________
There are two types of vessels, submarines and targets.

Top
#26260 - 2002-08-01 05:12 PM Re: IP detection in a batch file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I didn't say I have no legacy stuff. I have a few users that need to dual-boot betwen DOS and Win2k. That's the price they have to pay for holding on to legacy stuff.

This has been a bit of a digression from the original topic. In our mill we separate the process network from the business network with a firewall. The process network has no logon script. All process machines are severely locked down. The firewall keeps "Ned" in shipping from hacking in and taking down our process.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#26261 - 2002-08-03 05:14 AM Re: IP detection in a batch file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I know we have some 2-3 systems like cd-burners which does not any actual system on themselfs, just win9x.
and I feel sorry for you to have such programs that are so stupidly made that they don't want to co-operate with you.

anyway, in this particular subject, simple if might ably the best.

if @inwin<>1 or wrong_subnet exit 5000 endif
...
_________________________
!

download KiXnet

Top
Page 2 of 2 <12


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

Who's Online
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.063 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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