Launch an application from a script

Version 1

    Verified Product Versions

    CETerm 5.7

    The built-in scripting capability allows you to easily launch another application. This sample launches the control panel applet available on Windows CE and Windows Mobile OS platform terminals which is run using the ctlpnl binary.


    function launchControlPanel()


        // OS.Alert("Launching Control Panel");


        // NOTE: Make sure that the application which you are launching exists on your terminal.  


        // The third argument below is "open" for executable files, but it may be "edit"

        // or "print" to invoke those actions on a document file. Return 0 on success or

        // non-zero otherwise.


        //TODO: Comment or Uncomment either of these calls to match your OS platform


        // For Windows CE

        OS.Process.ExecuteAction("ctlpnl", "cplmain.cpl,9,1", "open");


        // For Windows Mobile

        // OS.Process.ExecuteAction("ctlpnl", "cplmain.cpl,7", "open");


    • Please reference the CETerm Scripting guide for detailed explanation
    • To launch a different application, you can simply replace the application absolute path and name and arguments in the OS.Process.ExecteAction call.
    • You can do this operation in any JavaScript code running under the CETerm scripting engine
    • This script will need to be called from another event handler, another script or be associated with a Key remap or HotSpot etc. The can simply be done using the following: