Skip to main content

The sysExecute operation in ArcScript can be used to call processes on the local system as long as you have access to the process, and this includes VBScript files that you create yourself. 

 

sysExecute

 

To call a VBScript, you’ll want to use cscript as the name of the process to execute, and pass the path to the vbs file as an argument. If there is whitespace in that path, you’ll want to include quotes around the full path so that the path is passed as a singular argument, e.g.:

<arc:set attr="sys.Name" value="cscript" />
<arc:set attr="sys.Arguments" value='"C:\\Program Files\\CData Arc\\www\\bin\\test.vbs"' />

<arc:call op="sysExecute" item="sys">
  <arc:set attr="output.data" value="asys.sys:output]" />
  <arc:set attr="output.filename" value="results.txt" />
  <arc:push item="output" />
</arc:call>

 

NOTE: This script returns the output of the vbs as a file output of the Script connector. If you just want to trigger the vbs, it is not necessary to read the output. 

Be the first to reply!

Reply