VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



find your IP code

by LUNATICCOBRA (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 3rd June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

find your IP code

Rate find your IP code




Dim WshShell,obj,Command,Result,Temp,FileName,File
Set obj = WScript.CreateObject("Scripting.FileSystemObject")
Set WshShell=WScript.CreateObject("WScript.Shell")
FileName=GetTempFile("command.txt")

Result = Ping()

Function Ping()

    Command = "%COMSPEC% /C ipconfig.exe > %TEMP%\command.txt"
    Result = WshShell.Run(Command,0,True)
    Temp = obj.GetSpecialFolder(2).Path
    Set File = obj.OpenTextFile(FileName)
    Ping = file.ReadAll
    file.Close
    obj.DeleteFile FileName,True

End Function

Function GetTempFile(File)
GetTempFile=WshShell.ExpandEnvironmentStrings("%TEMP%") & "\" & File
End Function

MsgBox(Result)


Download this snippet    Add to My Saved Code

find your IP code Comments

No comments have been posted about find your IP code. Why not be the first to post a comment about find your IP code.

Post your comment

Subject:
Message:
0/1000 characters