Dudu2
XLDnaute Barbatruc
Bonjour,
Peut-on en VBA trouver le Process Start Time ?
Peut-on en VBA trouver le Process Start Time ?
VB:
Option Explicit
Declare PtrSafe Function GetCurrentProcessId Lib "kernel32" () As Long
Sub a()
Dim Process As Object
For Each Process In GetObject("winmgmts:").ExecQuery("Select * from Win32_Process")
If Process.ProcessId = GetCurrentProcessId Then Exit For
Next Process
If Not Process Is Nothing Then
'MsgBox Process.Name
MsgBox System.Diagnostics.Process.GetProcessById(GetCurrentProcessId).StartTime
End If
End Sub