I have a bit of Visual Basic script that will echo the current computer name, IP address, and mac address. The only thing is by using the WScript.Echo is displays "Windows Script Host" as the title. I would like to change that title and am unsure if that can be done with WScript.Echo.
Set objShell = Wscript.CreateObject("Wscript.Shell")
Set colSystemEnvVars = objShell.Environment("System")
Set colUserEnvVars = objShell.Environment("User")
Set objNetwork = Wscript.CreateObject("Wscript.Network")
samUser = objNetwork.UserName
computerName = objNetwork.ComputerName
strComputer = "."
Set objWMIService = GetObject(_
"winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * FROM Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
WScript.Echo "Computer: " & computerName & vbCr & _
"IPAddress: " & strIPAddress & vbCr & _
"MACAddress: " & objItem.MACAddress & vbCr & _
I know this is just being a bit picky but i was wondering if there was a way to do it.
Thanks in advance for your responses.