I would like to obtain the current process id in a JScript script. This id is returned by the Windows API GetCurrentProcessId (http://msdn.microsoft.com/en-us/library/ms683180.aspx) function. How do I call this function in JScript?
This obviously doesn't work:
var id = GetCurrentProcessId();
WScript.Echo("ProcessId is " + id);