Allan Watson Posted July 14, 2008 Report Share Posted July 14, 2008 I am trying to run a simple Visual Basic Script from LabVIEW. I can successfully run the script from the Windows Command Prompt and by double-clicking on the *.vbs file. I tried running it using 'System Exec.vi', but I get an error everytime. I've tried many combinations of 'command line' and 'working directory' control inputs, but nothing has worked. Is the 'System Exec.vi' the right tool for the job? Does anyone have any suggestions? Thanks, Allan Quote Link to comment
Allan Watson Posted July 14, 2008 Author Report Share Posted July 14, 2008 I found one method using System Exec.vi that works. If I use the command line "cmd /C "VisualBasicScriptFile.vbs"" and set the working directory to the folder containing the .vbs file, it works. This is a simple enough solution, but I would like to hear other ideas about this. Thanks, Allan Quote Link to comment
jpdrolet Posted July 15, 2008 Report Share Posted July 15, 2008 You can also use the command line wscript.exe "file path" to execute the script. Or use Windows Script Control ActiveX interface to load/run scripts strings in memory. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.