Sys_CompareProcessOwner
Description
Section titled “Description”Compares the owners (the user accounts) of two running processes.
Syntax
Section titled “Syntax”Sys_CompareProcessOwner(sProcessOne, sProcessTwo, bMustExist) As Boolean
Parameters
Section titled “Parameters”sProcessOne (String)
Section titled “sProcessOne (String)”Name of the first process, for example explorer.exe
sProcessTwo (String)
Section titled “sProcessTwo (String)”Name of the second process
bMustExist (Boolean)
Section titled “bMustExist (Boolean)”If True, the function returns False when one of the processes isn’t running, or when its owner can’t be read
Return value
Section titled “Return value”Result will be stored in gbValue: True if both processes run as the same user, otherwise False. gbValue is also False if one of the processes isn’t running.
Example
Section titled “Example”If bStatus Then bStatus = Sys_CompareProcessOwner("wscript.exe", "explorer.exe", False)If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)Related functions
Section titled “Related functions”Sys_WaitForProcess Sys_Sleep Sys_KillProcess Sys_GetProcessOwner Sys_ExistProcess Constants Package Property Variables