Running batch files from inside Softimage


You can use the System command:

var sCommandLine = "C:\\users\\blairs\\test.bat";  
System( sCommandLine );

You can also use WScript.Shell:

// Use XSIFactory.CreateActiveXObject if in NetView
var wsh = new ActiveXObject("WScript.Shell");
wsh.run ("c:\\temp\\_SI.bat" )

If you want to use XSIUtils.LaunchProcess, you will have to do something like

XSIUtils.LaunchProcess( "cmd /C start C:\\test.bat" );

LaunchProcess is like the Win32 CreateProcess() api. You have to start a command interpreter session to run your batch file.