Is it possible to reach the runtime of the application?
I have no idea how to do that!
Get time running from the Browser
Moderator: DosItHelp
Re: Get time running from the Browser
You might be able to read it out of the following list:
penpen
Code: Select all
@echo off
>"tasklist.txt" tasklist /v
type "tasklist.txt"
Re: Get time running from the Browser
Try it with
Result is the starttime of notepad.exe:
You will have to do your own arithmetic to get the running time from that
(there are several threads on this forum that can help you with that)
Code: Select all
wmic process where caption='notepad.exe' get creationdate /value
Code: Select all
CreationDate=20200213231040.876129+060
(there are several threads on this forum that can help you with that)
Re: Get time running from the Browser
Another approach
Also used notepad just as an example. If there is more than one process with the same name running (as it is usual for browser applications) it takes the process with the oldest start time.
Steffen
Code: Select all
@echo off &setlocal
set "proc=notepad"
for /f %%i in (
'powershell -nop -ep Bypass -c "$ErrorActionPreference='SilentlyContinue';[string](New-TimeSpan (gps %proc%|foreach{$_.StartTime}|measure -minimum).minimum)"'
) do echo %%i
Steffen