KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using LAUNCH EXTERNAL PROCESS to launch VBScripts of JScripts
PRODUCT: 4D | VERSION: 11 | PLATFORM: Win
Published On: February 26, 2009

To execute a VBScript (.vbs) or JScript (.js) in the method LAUNCH EXTERNAL PROCESS, make sure to call the CSCRIPT command. For example:

LAUNCH EXTERNAL PROCESS("cscript C:\Scripts\myScript.js")


4D treats the execution of shells and apps as if they were executed from the Command Prompt, and the CSCRIPT command is necessary to run a VBScript or JScript through the Command Prompt.

For more information on the CSCRIPT command and its possible parameters, refer to:

https://technet.microsoft.com/en-us/library/bb490816.aspx