Thursday, February 26, 2009

getip




====================== ie progress msg/bar ==================







===================== network adaptot settings=================


Assign a Static IP Address
Assign the DNS Domain for a Network Adapter
Assign the WINS Server for a Network Adapter
Enable Dead Gateway Detection for All Network Adapters
Enable DHCP
Enable DNS on All Network Adapters

Enable WINS for All Network Adapters

. Send an empty array to the settings
errWins = objitem.SetWINSServers()

This eliminates the servers.


Sample scripts for configuring TCP/IP settings (IP address, DNS Server, WINS Server, etc.) on client computers.


Retrieving Network Configuration Information

Sample scripts for retrieving information about TCP/IP settings on client computers.






'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2007
'
' NAME: getGatewayAD
'
' AUTHOR: mmccafferty1 , pps
' DATE : 3/3/2009
'
' COMMENT:
'
'==========================================================================

Sub getGatewayAD()

Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("ipconfig /all")
Set objStdOut = objWshScriptExec.StdOut
Set objRegEx = CreateObject("VBScript.RegExp")

objRegEx.Global = True
objRegEx.Pattern = "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"


While Not objStdOut.AtEndOfStream
strLine = objStdOut.ReadLine
Set colMatches = objRegEx.Execute(strLine)

If InStr(strLine,"Gateway") And colMatches.Count > 0 Then
For Each strMatch in colMatches
Wscript.Echo strMatch.Value
arroctetts = Split(strMatch.Value,".")
Next
WScript.Echo UBound(arroctetts)
End If
Wend

For octett = 0 To UBound(arroctetts)
WScript.Echo octett & " " & arroctetts(octett)
Next

End Sub

Sub pingsubnet()
getGatewayAD
Dim WshShell, WshPing, strPingResults

Set WshShell = WScript.CreateObject("WScript.Shell")

'ping the subnet & put non ping addrs In a file
' Wscript.StdOut.Write strPingIP
For host = 2 To 254
Set WshPing = WshShell.Exec("ping -n 3 -w 1000 " & strPingIP) 'send 3 echo requests, waiting 1 sec each
strPingResults = LCase(WshPing.StdOut.ReadAll)
Next
End sub





Access 2007 Download: Access Runtime

Windows XP and Windows Server 2003 Behavior When Connected to Both Wired and Wireless Networks

How Can I Tell If a Wireless Network Adapter is Connected to the Network?

Querying wireless status in Windows with VBScript and WMI

MSNdis_80211_ServiceSetIdentifier

How Do I Find Information About the Network Adapter Cards on My Computer?
vba-ping

Function PingSilent(strComputer)




Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._

ExecQuery("select * from Win32_PingStatus where address = '"_

& strComputer & "'")



For Each objStatus in objPing

If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then

'WScript.Echo("Computer " & machine & " is not reachable")

PingSilent = 0

Else

'WScript.Echo("Computer " & machine & " is Live")

PingSilent = 1

End If

Next



End Function


IcmpSendEcho: Ping a Machine by IP Address

No comments: