S
S
sugarufc2019-06-10 17:27:04
cmd/bat
sugarufc, 2019-06-10 17:27:04

How to display IP through bat-file?

There is a command ipconfigthat displays the IP address of the machine.
There is a command Msg %username% Любой текстthat displays a window with a text message.
So, you need to create a bat file at startup that will display a window with a message, for example: "Your IP address is 192.168.1.1"
How can this be done, please tell me. Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Berkutman, 2019-06-10
@sugarufc

@echo off
echo %username% hello
WMIC NICCONFIG Where IPEnabled^=TRUE Get IPAddress /Value
pause
PS
Check internet connection
@echo off
echo %username% hello
WMIC NICCONFIG Where IPEnabled^=TRUE Get IPAddress /Value
Ping -n 1 -w 400 ya.ru 2>nul|Find "TTL=">nul&&(
Echo Internet Online
pause
)||(
Echo Internet Offline
pause
)
pause

W
wisgest, 2019-06-17
@wisgest

ipconfig|find "IP-"|msg *

S
serjiku, 2020-07-23
@serjiku

ipconfig
pause

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question