Hi in Windows 10 some applications like calculator ,if I run calc.exe it spawns the calculator.exe and and immediately exit cal.exe.my requirement is get the main window handle of this child process (calculator.exe) For getting the child process from parent process I tried following poweshell script. function Find-ChildProcess { param($ID=$PID)
Get-WmiObject -Class Win32_Process -Filter "ParentProcessID=$ID" | Select-Object -Property ProcessName, ProcessID, CommandLine }
This wokes with few applications like notepad but I am not getting child process for process like calculator and internet explorer.. Thank you