' 로컬 컴퓨터의 실행중인 Process 정보(이름, 핸들, ID) 보기
Function Handle
WScript.Echo "Handle() Start"
Dim strComputer
strComputer = "." ' 점(.)은 WMI에서 로컬 컴퓨터와 같음
Dim wbemServices, wbemObjectSet, wbemObject
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_Process")
For Each wbemObject in wbemObjectSet
WScript.Echo "Name: " & wbemObject.Name & vbCrLf & _
" Handle: " & wbemObject.Handle & vbCrLf & _
" Process ID: " & wbemObject.ProcessID
Next
WScript.Echo "Handle() End"
End Function
댓글 없음:
댓글 쓰기