The Computer Oracle

Fastest method to determine my PC's IP address (Windows)

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle

--

Chapters
00:00 Fastest Method To Determine My Pc'S Ip Address (Windows)
01:24 Accepted Answer Score 62
02:13 Answer 2 Score 23
02:26 Answer 3 Score 7
03:25 Answer 4 Score 6
03:45 Answer 5 Score 5
04:09 Thank you

--

Full question
https://superuser.com/questions/382265/f...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows #ipaddress #clipboard

#avk47



ACCEPTED ANSWER

Score 62


Type this into a .bat file. You can then create a shortcut to it and place it in the taskbar, start menu, or assign a hotkey.

ipconfig | find "IPv4" | find /V "192.168." | CLIP

What it does: First find returns all the lines that contain IPv4. If you have multiple network adapters, from example from VMWare, you may want to exclude them. That's where find /V comes into play, it finds all lines that do not contain given string. For example, that's what I get after the first find:

>ipconfig | find "IPv4"
   IPv4 Address. . . . . . . . . . . : 134.32.72.86
   IPv4 Address. . . . . . . . . . . : 192.168.229.1
   IPv4 Address. . . . . . . . . . . : 192.168.230.1

Finally, CLIP copies the output to the clipboard, so you will be left with

>    IPv4 Address. . . . . . . . . . . : 134.32.72.86

If that's not enough maybe someone else can refine it with fancy search patterns.




ANSWER 2

Score 23


Create a shortcut to BGinfo (a program that shows system information on the Windows background). Double-click. : )




ANSWER 3

Score 7


There seemed to be several solutions to this problem and I even came up with one of my own.

Similar to @iglvzx I too used the AutoHotKey utility to create my own utility app.

I've posted the app online here: http://dl.dropbox.com/u/177276/ipAddress.exe

I throw my exe into my Startup folder... and it sits quietly waiting until I hit the hotkey:

WindowsKey + I

which then brings up this dialog... allowing me to copy the address with a single click... or navigate to another window as the IP address will display on the app tab on the start bar. I ended up opting out of automatically putting it on the clipboard just in case I had something important on there that I didn't want to accidentally delete.

enter image description here

Here's the source code I used to get the IP address (it makes a presumption that the %A_IPAddress1% is the correct one (but from my testing it always was)):

#SingleInstance
#Persistent

Menu, tray, NoStandard
Menu, tray, add, Exit, ExitAppCompletely

Hotkey, #i, ShowIPAddress
return

ShowIPAddress:
Gui, Add, Text, x50 y8, Your IP Address:
Gui, Add, Edit, x140 y5 ReadOnly vIPAddress, %A_IPAddress1%
Gui, Add, Text, x50 y35 w250 vCopiedStatus,

Gui, Add, Button, x70 y65 w75, &Copy
Gui, Add, Button, x150 y65 w75, &Dismiss
Gui, Show, W290 H100 Center, %A_IPAddress1% - IP Address
return

ButtonCopy:
clipboard = %A_IPAddress1%
GuiControl,, CopiedStatus, Copied %A_IPAddress1% to the clipboard
Sleep, 1000
GuiControl,, CopiedStatus,
Sleep, 500

ButtonDismiss:
GuiClose:
Gui, Destroy
Exit

ExitAppCompletely:
ExitApp



ANSWER 4

Score 6


Have you tried using a netbios hostname instead?

Figure out your computer name, and then try to ping it using that name on a different computer.
You may find you don't need the IP address at all.

You can get the hostname by running the command hostname on your machine.




ANSWER 5

Score 5


I use www.whatismyip.org. Very simple to use, just navigate to the site in your favorite browser and it will display your external IP.

Like any text, just highlight and CTRL-C to copy.

If you set it as your homepage and put a shortcut in your QuickStart bar, it only takes 1 click and a copy to get your IP on the clipboard