none
Help PLease RRS feed

  • General discussion

  • hi all,

    wonder if you can assist me, i would like to know is it possible to get a script that can display the ip and computer name on the desktop, reason is we have over 200 users and asking to try and find an ip address is hard, so having it in the desktop would be really easy. i have tried bginfo but when ever the user changes the wallpaper all the information disappears.

    please help, it will be grealty appreciated,
    • Moved by Bill_Stewart Monday, July 28, 2014 4:38 PM Off-topic
    Wednesday, October 15, 2008 11:32 AM

All replies

  • Hi

    Before I finished reading your thread I was already thinking BGInfo. It seems that BGInfo runs on login, creates the background and then closes which means that each time a user changes their wallpaper the info won't come back till they logoff and back on again (at least thats how I read it).

    The way I've done it at various companies is to write a HTA that displays useful info for support staff, some kind of desktop info tool. Below is some code to get the IP address and computer name and then display that with a simple message box. Create an icon on the desktop and the user can click this to get the information required.

    1'Connect to WMI and obtain instances of Win32_NetworkAdapterConfiguration where IP is enabled 
    2Set oNetworkAdapters = GetObject("Winmgmts:").ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=True"
    3 
    4'Search network adapters for IP address and MAC address 
    5For Each oAdapter In oNetworkAdapters 
    6    If IsArray(oAdapter.IPAddress) Then sIPAddress = oAdapter.IPAddress(0) 
    7    sMACAddress = oAdapter.MACAddress 
    8Next 
    9 
    10'Tidy environment 
    11Set oNetworkAdapters = Nothing 
    12 
    13 
    14Set oNet = CreateObject("WScript.Network"
    15 
    16MsgBox "Computer Name: " & oNet.ComputerName & vbCrLf & "IP Address: " & sIPAddress & vbCrLf & "MAC Address: " & sMACAddress, vbOKOnly + vbInformation 
    17 
    18Set oNet = Nothing 
    19 

    regards
    qsilverx




    Wednesday, October 15, 2008 8:42 PM
  • actually just read that you can use a /popup switch on BGInfo and this should display the information in a window and not update the background wallpaper. so you could create a shortcut to run bginfo /popup which the user can run when requested.

    qsilverx
    Wednesday, October 15, 2008 8:47 PM