Hi guys,
I get the below from the other thread. now I get it working in my local computer, but i want is to get the process of the other computer. I know that it has the capability to do so but the problem is it can't get the processes on a computer that has a password. Kindly help please.
Thanks and God bless

ProcessID Code:
  1. Option Explicit
  2. Private Sub Form_Load()    
  3. Dim strComputer As String    
  4. Dim sReturn As String    
  5. Dim strNameOfUser As Variant    
  6. Dim colProcesses As Object    
  7. Dim objProcess As Object    
  8. strComputer = "." '"." local or "\\ComputerName"    
  9. Set colProcesses = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2").ExecQuery("Select * from Win32_Process")    
  10. For Each objProcess In colProcesses        
  11. sReturn = objProcess.GetOwner(strNameOfUser)        
  12. If sReturn <> 0 Then            
  13. MsgBox "Could not get owner info for process " & objProcess.Name & vbNewLine & "Error = " & sReturn        
  14. Else            
  15. MsgBox "Process " & objProcess.Name & " is owned by " & "\" & strNameOfUser & "."        
  16. End If    
  17. Next
  18. End Sub