LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2006, 03:59 PM   #1
0aniel
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Rep: Reputation: 0
Quick script


Hi there,

I was wondering if you could help me put together a script, which can execute a batch file on a Windows XP/2003 computer to discover;
IP address
Mac Address
NetBIOS names of all the devices on a subnet and save the results to a .txt file located on a Desktop.

Cheers
 
Old 05-04-2006, 04:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
whilst the programming forum is OS agnostic, this is very very heavily involved in the windows world, so i wouldn't hold out hope for much help. having said that i'd suggest you looked at using the wscript engine to pull configuration details out fairly simply from windows instead of using a clumsy batch file.
 
Old 05-04-2006, 04:06 PM   #3
0aniel
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I see, do you have any Ideas how to do it?
 
Old 05-04-2006, 08:47 PM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
well, for starters you can install the BASH (Bourne Again SHell) on a windows box. and then, write the script for the BASH shell. Click here for a complete BASH reference guide (it's how I learned BASH scripting.

Now, you may very well run into the problem that Windows does not have any pattern matching programs (ie. grep), so, in that case, write the script in Perl.

You'll need the pattern matching because, quite simply, I'm pretty sure the
Code:
ipconfig
and
Code:
netstat -a
commands will give you all the information you want, but you want ceratin bits, and want to filter through all the gunk in between.

Final answer: write a Perl script.
 
Old 05-05-2006, 11:55 AM   #5
DanTaylor
Member
 
Registered: Jan 2006
Distribution: Debian Sarge
Posts: 265

Rep: Reputation: 30
I'll put together a script for you tonight and post it if you want.
 
Old 05-05-2006, 12:54 PM   #6
0aniel
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Oki thx mate.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone write me a super quick script? Ashrack Programming 4 03-03-2006 12:27 AM
Quick Script for Wireless underscorelinux Programming 3 10-12-2005 06:58 AM
Need quick 1-line script help. mehesque Linux - Software 2 08-24-2005 02:18 PM
Need a quick perl script if anyone has a moment Seventh Programming 1 09-30-2004 10:42 AM
I need a quick shell script. 360 Programming 3 03-22-2002 04:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration