Sign in to follow this  
Followers 0
PerryRaptor

Getting IP Address from remote machines

4 posts in this topic

Looking for ideas on how to retrieve the IP Address, DNS, WINS, and Gateway settings from remote workstations. All are Win2K and XP workstations. Also, I'd like to know if the workstation is using DHCP or is a static assignment.

I ask because AutoIT3 documentation isn't finished and I've only been using AutoIT3 since Monday.

I created an inventory script in VBscript, using WMI, but I have to paste the whole IPconfig/all output into the second text file.

I like to use a text file that contains only the NetBIOS Name of the machines and have the script use a DO...UNTIL construct to step through the textfile. A nested IF...Else construct runs MS's Ping command to test for connectivity and a FOR...NEXT loop fetches the information from the remote machine and writes lines into the second text file.

Had a little trouble with IF NOT $a = $b ...ENDIF but figured out that IF $a <> $b ...ENDIF would work for me.

Share this post


Link to post
Share on other sites



why don't you run IPconfig remotely and save its output. then read the output and filter out the bits you want before writing it to your inventory file?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

That is a good idea...I'll try it. I've been playing around with the @IPAddress? macros. only @IPAddress1 returns anything. IPAddress2 thru 4 just return zeros.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Some pc's have multiple NIC's and IPadresses ....

When your run "IPconfig /all".. they will be all listed.

@IPAddress1-4 returns the first four adresses of the pc its run on.

I use psexec from sysinternals for running pgms on remote pc's....

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0