cool hit counter VBA process to find program paths and command parameters_Intefrankly

VBA process to find program paths and command parameters


Function Process path(Optional exen) 'Debug.Print Process path("EXCEL.EXE") If IsMissing(exen) Then exen = "EXCEL.EXE" Set p = GetObject("WinMgmts:").InstancesOf("Win32_Process") For Each Pj In p If Pj.Description = exen Then process path = Pj.ExecutablePath Next End Function

Function Process commands(Optional exen) 'Debug.Print Process path("EXCEL.EXE") If IsMissing(exen) Then exen = "EXCEL.EXE" Set p = GetObject("WinMgmts:").InstancesOf("Win32_Process") For Each Pj In p If Pj.Description = exen Then process command = Pj.Commandline Next End Function

Function List of process paths(Optional exen) 'Debug.Print List of process paths("EXCEL.EXE") If IsMissing(exen) Then exen = "EXCEL.EXE" Set p = GetObject("WinMgmts:").InstancesOf("Win32_Process") For Each Pj In p If Pj.Description = exen Then process path list = process path list + Chr(13) + Pj.ExecutablePath Next End Function

Function List of process commands(Optional exen) 'Debug.Print List of process commands("EXCEL.EXE") If IsMissing(exen) Then exen = "EXCEL.EXE" Set p = GetObject("WinMgmts:").InstancesOf("Win32_Process") For Each Pj In p If Pj.Description = exen Then List of process commands = List of process commands & Chr(13) & Pj.Commandline Next End Function

Function List of processes(Optional d) 'Debug.Print List of processes() 'd=1 Process only,2 process+ trails,3 process+ Path parameters If IsMissing(d) Then d = 3 Set p = GetObject("WinMgmts:").InstancesOf("Win32_Process") For Each Pj In p i = i + 1 If d = 1 Then tmp = tmp & i & vbTab + Pj.Description + Chr(13) If d = 2 Then tmp = tmp & i & vbTab + Pj.Description + Chr(13) + vbTab + Pj.ExecutablePath + Chr(13) If d = 3 Then tmp = tmp & i & vbTab + Pj.Description + Chr(13) + vbTab + Pj.Commandline + Chr(13) Next Process list = tmp End Function


Recommended>>
1、Another SWIFT hack hits Russian banks with 6 million stolen
2、Quickly come to zhejiang mahjong cheat zhejiang mahjong hang mahjong auxiliary seethrough software universal version
3、Why can machines grow by constantly learning through neural networks
4、Cat Chain Weekly NewsNo119
5、Hidden Coin Ninja Monroe

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号