标签:count rgb 进程 where nothing val ros user div
试了好多种,这个方法蛮好用的。有更好的,希望大家多多指教。
Dim ProNo As Integer, ProStr As String ProNo = IsRunning("SSS.exe") If ProNo = 0 Then Shell App.path & "\SSS.exe ‘" & strusername & "‘, PDAOvenInBatch", vbNormalFocus ‘ ‘" & strusername & "‘, PDAOvenInBatch End If ‘方法 Function IsRunning(ByVal process As String) As Integer Dim OBJWMIService, colProcesses, colProcesse As Object Set OBJWMIService = GetObject("winmgmts:") Set colProcesses = OBJWMIService.ExecQuery("Select * From Win32_Process Where Name=‘" & process & "‘") IsRunning = colProcesses.count ‘For Each colProcesse In colProcesses ‘ MsgBox colProcesse.ExecutablePath ‘ 进程路径 ‘Next Set colProcesses = Nothing: Set OBJWMIService = Nothing End Function
标签:count rgb 进程 where nothing val ros user div
原文地址:https://www.cnblogs.com/Mandy-ZQ-Ma/p/14499874.html