Re: IP ADDRESS
- From: Cliff <cponce@xxxxxxxxxxxxxxxx>
- Date: Mon, 28 Jul 2008 05:05:16 -0700 (PDT)
On Jul 24, 10:52 pm, LOIS <cesar_pin...@xxxxxxxxxxx> wrote:
I WORK WITH D3 ON LINUX, I WANT TO GET MY IP ADDRESS DIRECTLY FROM D3.
CAN ANYONE HELP ME ???
THANKS.
We are using AccuTerm so I wrote a VBScript to run the "ipconfig"
command and piped it to a file on the client's C drive.
Dim sDirectory As String
Dim WshShell As Object
Dim sWinDir As String
set WshShell = CreateObject("WScript.Shell")
sWinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
sDirectory = sWinDir
If Right(sDirectory,1) <> "\" Then sDirectory = sDirectory & "\
sDirectory = sDirectory & "System32\"
sDirectory = sDirectory & "ipconfig /all>c:\security.txt"
WshShell.Run("%comspec% /c " & sDirectory,0,True)
Another script is used to make a tab delimited file out of the
output. This is required so FTD works properly in the next step.
Dim oFSO As Object
Dim oFile As Object
Dim sText As String
Dim sOutput As String
Dim iX As Integer
Dim iCnt As Integer
Const forReading = 1, forWriting = 2, forAppending = 8
Set oFSO = CreateObject("Scripting.FileSystemObject")
set oFile = oFSO.OpenTextFile("C:\Security.txt",forReading,True)
sOutput = ""
iCnt = 0
Do Until oFile.AtEndOfStream
iCnt = iCnt + 1
sText = oFile.ReadLine
If sOutput = "" Then
sOutput = "Security" & Chr(9) & sText
Else
sOutput = sOutput & Chr(9) & sText
End If
Loop
oFile.Close
Sleep 2000
set oFile = oFSO.OpenTextFile("C:\Security.txt",forWriting,True)
oFile.WriteLine "*"
oFile.WriteLine sOutput
oFile.Close
Then we use FTD to import the file and parse the results
DATA "R"
DATA "K"
DATA "C:\SECURITY.TXT"
DATA ""
DATA "PORT":PORTNO
EXECUTE "FTD"
This allows us to keep track of the IP Address, MAC Address, and
Gateway of every log on session on the system.
Cliff
.
- References:
- IP ADDRESS
- From: LOIS
- IP ADDRESS
- Prev by Date: Re: D3 ODBC Problem
- Next by Date: Re: D3 Phantom Logoff/on nightly process
- Previous by thread: Re: IP ADDRESS
- Next by thread: Re: IP ADDRESS
- Index(es):
Relevant Pages
|