Rob van der Woude's Scripting Pages

Help text for GetMyPID.cs

(view help text of GetMyPID.cs as plain text)

GetMyPID,  Version 1.00
Return or check the parent's (caller's) Process ID

Usage:    GETMYPID  [ pid ]  [ /v ]

Where:    pid   is the expected PID to check the actual PID against
          /V    display verbose information on the parent process

Notes:    With an expected PID specified, this program returns 'errorlevel'
          0 if the actual PID matches the expected value, or 2 if not;
          otherwise, it returns an 'errorlevel' equal to the PID.
          So to get a batch file's PID, use the following commands:

              SET PID=%ErrorLevel%

Credits:  ParentProcess class by Jared Barneck

Written by Rob van der Woude

page last uploaded: 2017-03-25, 21:31