Desktop Wallpaper displaying System Information and Computer Name

Hi guys hope you are well.

Id like to display system information as desktop wallpaper on each server on our network, and was just wondering how you might go about doing this with vbscript.
Such information as:
- Computer Name
- Operating System
- Service Pack
- Memory
- Processor
- IP Address
etc

And be able to use this script against all our servers .

Any help greatly appreciated.

Thank you :>)
LVL 1
Simon336697Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
RobSampsonConnect With a Mentor Commented:
G'day Simon,

I'm not sure if BGInfo can turn a HTML into a wallpaper image, but it it can, you could use this to create the HTML file:

'====================
strComputer = InputBox("Please enter the computer to generate a page for:", "Computer Name")

If strComputer = "" Then
      Msgbox "No computer name or IP Address was entered.",vbOKOnly,"No Computer Name or IP Address"
      WScript.Quit
End If

If Ping(strComputer) = False Then
      MsgBox strComputer & " did not respond to ping. No action could be taken.",vbOkOnly, "Cannot continue script."
      WScript.Quit
End If      

Set objWMIService = GetObject("winmgmts:" _
      & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colComputer = objWMIService.ExecQuery _
      ("Select * from Win32_ComputerSystem")

Set colComputerIP = objWMIService.ExecQuery _
      ("Select * from Win32_NetworkAdapterConfiguration")

Set colSystemInfo = objWMIService.ExecQuery _
      ("Select * from Win32_OperatingSystem",,48)

For Each objComputer in colComputer
      strUserName = "User Name: " & objComputer.UserName
      strHostName = "Host Name: " & objComputer.Name
Next

For Each IPConfig in colComputerIP
      If Not IsNull(IPConfig.IPAddress) Then
            For intIPCount = LBound(IPConfig.IPAddress) To UBound(IPConfig.IPAddress)
                  strIPAddress = strIPAddress & "IP Address: " & IPConfig.IPAddress(intIPCount) & "~"
            Next
      End If
Next

If Right(strIPAddress, 1) = "~" Then
      strIPAddress = Left(strIPAddress, Len(strIPAddress) - 1)
End If
strIPAddress = Replace(strIPAddress, "~", vbCrLf)

For Each objItem in colSystemInfo
      strOS_Caption = "Caption: " & objItem.Caption
      strOS_SPVersion = "SP Version: " & objItem.CSDVersion
      strOS_VerNumber = "Version Number: " & objItem.Version
Next

'MsgBox strUserName & vbcrlf & strHostName & vbcrlf & _
'strIPAddress & vbcrlf & strOS_Caption & vbcrlf & _
'strOS_SPVersion & vbcrlf & strOS_VerNumber, vbOKOnly, "Login Details"
   
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objHTMLFile = objFSO.CreateTextFile(strComputer & ".htm", True)
objHTMLFile.WriteLine "<HTML>"
objHTMLFile.WriteLine "<HEAD>"
objHTMLFile.WriteLine "</HEAD>"
objHTMLFile.WriteLine "<BODY>"
objHTMLFile.WriteLine "<H2>Web page for " & strComputer & "</H2>"
objHTMLFile.WriteLine strUserName & "<BR>" & strHostName & "<BR>" & _
      strIPAddress & "<BR>" & strOS_Caption & "<BR>" & _
      strOS_SPVersion & "<BR>" & strOS_VerNumber
objHTMLFile.WriteLine "</BODY>"
objHTMLFile.WriteLine "</HTML>"
objHTMLFile.Close
Set objHTMLFile = Nothing

MsgBox "Finished. Please see " & strComputer & ".htm"

Function Ping(strComputer)
      Dim objShell, boolCode
      Set objShell = CreateObject("WScript.Shell")
      boolCode = objShell.Run("Ping -n 1 -w 300 " & strComputer, 0, True)
      If boolCode = 0 Then
            Ping = True
      Else
            Ping = False
      End If
End Function
'====================


Regards,

Rob.
0
 
Ashish PatelConnect With a Mentor Commented:
Look at this BgInfo v4.12 for more details view the link below.

http://www.softpedia.com/get/System/System-Info/BGInfo.shtml
0
 
kanalQkoConnect With a Mentor Technical Support EngineerCommented:
0
 
Simon336697Author Commented:
Incredible work Rob (hope u are well :>)).

Simon
0
All Courses

From novice to tech pro — start learning today.