본문 바로가기

카테고리 없음

[VB Script] 실행중인 프로세스 체크

Dim strProcName : strProcName = LCase(sProcName)
Dim isExec : isExec = "N"
Dim objProcList
Dim objProcess

Set objProcList = GetObject("winmgmts:").InstancesOf("win32_process")
For Each objProcess In objProcList
If LCase(objProcess.Name) = strProcName Then
isExec = "Y"
End If
Next

Set objProcList = Nothing