meson: Update zlib.wrap to use wrapdb instead of github fork
[platform/upstream/gstreamer.git] / cmd_or_ps.ps1
1 $i=1
2 $ppid=(gwmi win32_process -Filter "processid='$pid'").parentprocessid
3 $pname=(Get-Process -id $ppid).Name
4 While($true) {
5   if($pname -eq "cmd" -Or $pname -eq "powershell") {
6     Write-Host ("{0}.exe" -f $pname)
7     Break
8   }
9
10   # 10 times iteration seems to be sufficient
11   if($i -gt 10) {
12     Break
13   }
14
15   # not found yet, find grand parant
16   $ppid=(gwmi win32_process -Filter "processid='$ppid'").parentprocessid
17   $pname=(Get-Process -id $ppid).Name
18   $i++
19 }