Support static option in batch mode
Merge pull request #14873 from Nibbler999/batch-static

Support static option in batch mode