Need excel 2010 Macro wmi to extract username from wmi?
I need a excel 2010 macro wmi to help me extract username from wmi.
I have windows 7 and office 2010 on my laptop.
I need a excel 2010 macro wmi to help me extract username from wmi.
I have windows 7 and office 2010 on my laptop.
Hey Dennis,
You should do the following-
1. Change the USER21 Macro with $ARG1$ by typing in the command – ch wig $ARG1$.
2. Then replace by writing – mv wig uspl
4. A window will appear. Click apply to host and close the terminal.
And you will be able to extract.
Â
I tried searching for a Microsoft Office Excel macro that can be used to extract usernames in WMI files.
I found several macros on my search and here is one of the macros I found that might help you in extracting some information on WMI files.
Function GetFullName() As String
   Dim computer As String
   computer = "."
   Dim objWMIService, colProcessList As Object
   Set objWMIService = GetObject("winmgmts:\" & computer & "rootcimv2")
   Set colProcessList = objWMIService.ExecQuery _
       ("SELECT * FROM Win32_Process WHERE Name = 'EXCEL.EXE'")
   Dim uname, udomain As String
   Dim objProcess As Object
   For Each objProcess In colProcessList
       objProcess.GetOwner uname, udomain
   Next
   GetFullName = UCase(udomain) & "" & UCase(uname)
End Function