Ok properly me being daft but Iíve been trying to write a script that call a process if there are less than 10 copies running, but for some reason I cant count the number of process running, colProcessList.Count only comes back with 1.

Code:
On Error Resume Next
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objShell = CreateObject("WScript.Shell")
Set colProcessList = objWMIService.ExecQuery _
    ("Select * from Win32_Process" & _
	" Where Name = 'cmd.exe'")

dim fs,objTextFileset
set fs=CreateObject("Scripting.FileSystemObject")
dim arrStr
set objTextFile = fs.OpenTextFile("C:\Users\men\Desktop\temp.csv")
Set WSHShell = CreateObject("Wscript.Shell")

Do while NOT objTextFile.AtEndOfStream 
arrStr = split(objTextFile.ReadLine,",")
 
 
 
If colProcessList.Count = 2 Then
    	wscript.Sleep 4000
Else
	WSHShell.Run "C:\Users\men\Desktop\xcacls.bat" & " " & arrStr(0)
	
End If

loop

objTextFile.Closeset 
objTextFile = Nothingset 
fs = Nothing
Any thoughts or even a better way of getting all the permitions off a Shaired drive.