title: vbs- Object doesn't support this property or method: objProcess.commandLine
body: <p>I have the below vbs script which should accept a processname (e.g. Notepad.exe), and then report the relevant details for all processess matching that name.</p>
  
  <p>It works fine on my PC (win 7), but on my server (Windows 2000) I get an error saying that <code>"Object doesn't support this property or method: objProcess.commandLine"</code> (line 30)</p>
  
  <p>I'm assuming that it is something to do with windows 2000, as I have it running on Windows 2008 ok. Is there something I need to install / change to make this work?</p>
  
  <pre><code>    Option Explicit
  
  dim strComputer
  dim objWMIService
  dim colProcessList
  dim objProcess
  dim PName
  dim PCommandLine
  dim PCLSplit
  dim input
  dim counter
  
  input = InputBox("Please Enter the Process Name, as shown in Task Manager", "Enter Process Name", , 100, 200)
  
  If input = "" Then    
      WScript.Echo "Canceled"
  Else 
      WScript.Echo "You Entered: " &amp; input
  
      strComputer = "."
      Set objWMIService = GetObject("winmgmts:" &amp; "{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\cimv2")
      Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = '" &amp; input &amp; "'")
  
      counter = 1
      For Each objProcess in colProcessList
          Wscript.echo counter &amp; ")"
          PName = objProcess.Name
          PCommandLine = objProcess.CommandLine
  
          PCLSplit = SPLIT(PCommandLine,chr(34))
  
          Wscript.Echo "Application Name: " &amp; PName &amp; VbCrLf &amp;_
          "Command Line: " &amp; PCLSplit(1) &amp; VbCrLf &amp;_
          "Instance Name: " &amp; PCLSplit(2) &amp; VbCrLf
          counter = 1+1    
      Next
  
  wscript.echo "COMPLETE"
  
  End If
  
  wscript.quit
  </code></pre>