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/libra
Windows APIs aren't made available to the JScript runtime. You're limited to methods and properties listed in the MSDN JScript language reference, although you can also connect to WMI and create instances of COM Objects to extend beyond JScript's limitations.
You have the answer in DynamicWrapperX v1.0.