I just received issue 49 of VMware's corporate newsletter.
Since I don't let GMail automatically download images, this is what the message looked like initially:
After downloading the images, it looks like this:
Blah blah indeed.
In another post, I provided a VB script that outputs the status of the guests running on a VMware Server. With a tiny modification that script can be used within Sysinternals' BGInfo, to display this information on the host's desktop:
In order to do this, change the line "WScript.Echo s
" to "Echo s
". In BGInfo, create a VBScript Custom field, by clicking "Custom...", "New...", selecting "VB Script file" and entering a field name and the path to your script.
VmCOM is a COM-based API that allows you to control VMware Server from your own software. As an example, the following script displays the status of each registered guest:
Option Explicit
Dim cp, server, vmCollection, vmName, vm, s
Const vmErr_VMBusy = &H80040215
Const vmExecutionState_On = 1
Const vmExecutionState_Off = 2
Const vmExecutionState_Suspended = 3
Const vmExecutionState_Stuck = 4
Set cp = CreateObject("VmCOM.VmConnectParams")
Set server = CreateObject("VmCOM.VmServerCtl")
server.Connect cp
Set vmCollection = server.RegisteredVmNames
For Each vmName in vmCollection
Set vm = CreateObject("VmCOM.VmCtl")
On error resume next
vm.Connect cp, vmName
If Err.Number = vmErr_VMBUSY Then
s = Basename(vmName) & ": BUSY"
ElseIf Err.Number <> 0 Then
s = Basename(vmName) & ": ERROR"
Else
On Error Goto 0
s = vm.Config("displayName") & ": " & State2Str(vm)
End if
WScript.Echo s
next
Function State2Str(ByVal vm)
Select Case vm.ExecutionState
Case vmExecutionState_On
State2Str = " ON"
Case vmExecutionState_Off
State2Str = " OFF"
Case vmExecutionState_Suspended
State2Str = "SUSPENDED"
Case vmExecutionState_Stuck
State2Str = " STUCK"
Case else
State2Str = " UNKNOWN"
End Select
End Function
Function Basename(ByVal path)
Dim pos
pos = InstrRev(path, "\")
If pos > 0 Then
Basename = Mid(path, pos + 1)
Else
Basename = path
End If
End Function