Class WindowsScriptHost


  • public class WindowsScriptHost
    extends Object
    Windows script host allows the execution of VB and other scripts.
    Author:
    Hendrik Schreiber
    • Method Detail

      • execute

        public String execute​(String script,
                              String fileExtension,
                              int timeout,
                              String... args)
                       throws ScriptException
        Execute script with timeout.
        Parameters:
        script - script
        timeout - timeout
        args - arguments
        Returns:
        script output (this might be truncated)
        Throws:
        ScriptException - if something goes wrong
      • execute

        public String execute​(Path scriptFile,
                              String... args)
                       throws ScriptException
        Execute script file with default timeout.
        Parameters:
        scriptFile - script
        args - arguments
        Returns:
        script output (this might be truncated)
        Throws:
        ScriptException - if something goes wrong
      • execute

        public String execute​(Path scriptFile,
                              int timeout,
                              String... args)
                       throws ScriptException
        Execute script file.
        Parameters:
        scriptFile - script
        timeout - timeout in seconds
        args - arguments
        Returns:
        script output (this might be truncated)
        Throws:
        ScriptException - if something goes wrong