The LaunchProcessNonBlocking Method of the Generic ActiveX Object launches a new process that does not block execution.
LaunchProcessNonBlocking (Method of the Generic ActiveX Object) Syntax var ProcessHandle = objGeneric.LaunchProcessNonBlocking(strImageName, strCommandLine);
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
Name Possible Values Description
Default Value strImageName String Filename of application to execute N/A strCommandLine String Optional command line parameters N/A
Return Values
Name Description ProcessHandle The launched process handle
Examples
The following javascript example launches the CtlPanel and returns immediately:
<script> var objGeneric = new ActiveXObject("PocketBrowser.Generic"); alert('Process handle was: ' + objGeneric.LaunchProcessNonBlocking('\\application\\ctlpanel.exe', '')); </script>
Copy example to clipboard
Remarks
The process handle returned by this method must eventually be freed by passing it to the CloseProcess method, otherwise there will be a resource leak in Windows. To wait until the launched process has completed call the method WaitProcess using the returned handle. Once the process has finished get its exit code by calling GetProcessExitCode.
Additional Information
Supported Platforms Windows CE, Windows Mobile Persistence Runs immediately. Min. Requirements None.