All templates
ScriptingIntermediate
Display VBScript Output
Robomotion•Updated 9 months ago

Overview
Executes a VBScript snippet and displays its output. Useful when integrating with legacy Windows tooling.
Display VBScript Output
Microsoft VBScript is a general-purpose, active scripting language designed for various environments. Robomotion users can run VBScript scripts through their flows and unlock unlimited automation capabilities.
What Display VBScript Output can do
- Build script (
Core.Programming.Function) — stores the inline VBScript body inmsg.vbs_script, builds a temp pathmsg.vbs_pathunder$TempDir$(fallbackC:\Windows\Temp), and preparesmsg.vbs_args = ['//Nologo', msg.vbs_path]. - Write temp VBS (
Core.FileSystem.WriteFile,optMode: truncate) — writesmsg.vbs_scripttomsg.vbs_path. - Run VBScript (
Core.Process.StartProcess) — runscscriptwithmsg.vbs_args, captures stdout intomsg.vbscript_output. - Delete temp VBS (
Core.FileSystem.Delete,continueOnError: true) — cleans up the temp.vbsfile. - Trim output (
Core.Programming.Function) — strips trailing CR/LF frommsg.vbscript_output. - Message Dialog (
Core.Dialog.MessageBox,optType: info) titledOutput from VBScript:showsmsg.vbscript_output, thenCore.Flow.Stop.
Behind the scenes
WScript.Echowrites to stdout undercscript.exe; underwscript.exeit would pop a modal. The flow usescscriptso the value arrives via stdout and can be captured.- The temp file name includes
Date.now()to avoid collisions across concurrent runs; deletion is best-effort (continueOnError). - VBScript is deprecated in Windows 11 24H2 — for new work prefer PowerShell.
More scripting templates
See all 7 →- Convert Excel to PDF Using VBScriptRuns an inline VBScript that drives Excel COM to export a workbook as PDF. Shows how to bridge Robomotion with Windows scripting.
- Display JavaScript OutputExecutes an inline JavaScript snippet and surfaces its return value in a dialog. Demonstrates the JavaScript Run node.
- Display PowerShell OutputRuns a PowerShell script and displays the captured standard output in a dialog.
- Display Python OutputRuns an inline Python script and shows its output in a dialog. Demonstrates the Python Run node.
- Extract Text from Word DocumentUses a VBScript bridge to pull raw text out of a .docx file for downstream NLP or search indexing.
- Get Login Name Using PythonRetrieves the current Windows login user via an inline Python script. Handy for audit trails or user-scoped paths.