Hello, We are running vmware view desktops. I would like to record the details of the client that is used to connect to the VMs.
Vmware has some sample of code of this info being pulled from registry here: http://blogs.vmware.com/thinapp/2010/09/looking-up-view-client-machine-info-and-using-it-in-a-thinapp.html
I would like the client NAME, IP, and MAC to be written to a text file with a Timestamp triggered by login script. (UNC PATH \\Server\share)
So using the example code below how do i get that written to a text file instead of a Messagebox?
'Declare Environment Variables
Dim vMachine, vIP, vMAC
'Set Environment Variables
Const HKEY_CURRENT_USER = &H80000001
Set wmiNameSpace = wmiLocator.ConnectServer(".", "root\default")
Set objRegistry = wmiNameSpace.Get("StdRegProv")
sPath = "Volatile Environment"
'Lookup values in registry and assign to variables
lRC = objRegistry.GetStringValue(HKEY_CURRENT_USER, sPath, "ViewClient_Machine_Name", vMachine)
lRC = objRegistry.GetStringValue(HKEY_CURRENT_USER, sPath, "ViewClient_IP_Address", vIP)
lRC = objRegistry.GetStringValue(HKEY_CURRENT_USER, sPath, "ViewClient_MAC_Address", vMAC)
'Test Message Box to show values
MsgBox "The Remote Device Name is " & vMachine & " @ " & vIP & "(" & vMAC & ")",, "NTDLL Call Test"