How to run a Workbench script in headless in mode?

Landon Mitchell Kanner
Landon Mitchell Kanner Member, Employee Posts: 291
25 Answers 100 Comments 25 Likes First Anniversary
✭✭✭✭
edited June 2023 in Structures

I have a Workbench script that I would like to run fully headless.

Answers

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 291
    25 Answers 100 Comments 25 Likes First Anniversary
    ✭✭✭✭
    edited July 2023

    This command line will start Workbench (version 2022 R2) in headless mode and run the script RunWB.wbjn, which resides in the current working directory (%cd%) of the Command Prompt:

    "%AWP_ROOT212%\Framework\bin\Win64\runwb2.exe" -B -R "%cd%\RunWB.wbjn" -nowindow
    

    Note that -nowindow is an undocumented command, which are outside of any Quality Assurance (QA) programs and may not be forward compatible. Use at your own risk. You can get a list of arguments using ProcessExplorer for any executable. Refer to this.


    Documented arguments for runwb2.exe:

    -A addinsfile: Use addins file 'addinsfile'
    -B: Run in batch
    -C configfile: Use configration 'configfile'
    -D dataFile: Import an application data file
    -E statement: Execute a journal statement at startup. May be repeated
    -F WBProject: Open a Workbench project file (*.wbpj)
    -I: Run interactively
    -L language: Show UI in 'language'
    -R replayfile: Use replay file 'replay'
    -W workspace: Start UI with specified workspace
    -X: Run interactively & exit upon journal replay end