• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

Computer Information on Desktop

hello everyone.  How to display computer name and IP address on Windows desktop?
0
rodrobb
Asked:
rodrobb
1 Solution
 
Thomas GrassiSystems AdministratorCommented:
0
 
d0ughb0yCommented:
Try this VBScript:

Set objNIC = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")

for Each Interface in objNIC
	if Interface.IPEnabled then
		StrIP = Interface.IPAddress(i)
		Set WshNetwork = Wscript.CreateObject("Wscript.Network")
		CompName = WshNetwork.ComputerName
		MsgBox "Computer Name:" & vbTab & CompName & vbNewLine _
			& "IP Address:" & vbTab & StrIP,4160,"Computer Name & IP"
	End If
Next

Open in new window

0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now