Hi guys, I am trying to use an x command to open/run a vbs script. The command is simply: options noxsync noxwait; x "F:\SAS_USER\myname\SAS2script\ext_files\VBS_TEST.vbs"; The VBS script is supposed to move data from a csv file to an excel work book and then run a macro. You can tell that it partially works, because an Excel process is started in the background. However, this excel process doesn't doesn't run any macros. When I run the very same command using command prompt, everything works fine. Has anyone ever experienced anything like this (script working in command prompt but not in SAS)? Thanks!
Phil: Since you indicate that it will run correctly from the command prompt, I can think of one alternative that would be easy to test, namely putting the command (to run the vb script) in a .bat file and using the x command to run the .bat file.
Thanks for your response, Arthur. I tried running the batch file with the command to run the vbs script, but it still isn't working. Then I tried the same thing in SAS Base (I walys use Enterprise Guide) and it worked. I was able to run both, batch file and vbs script directly via X command using SAS Base. So it looks as if something is blocking x commands in Enterprise Guide.
BTW: I already allowed XCMD on the workspace server.
Phil: This may help: Using the X and SYSTASK commands from SAS Enterprise Guide - The SAS Dummy
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.