IMacro stuck when ran from SQL xp_cmdshell

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Scout2Win
Posts: 1
Joined: Sun Sep 06, 2015 12:57 pm

IMacro stuck when ran from SQL xp_cmdshell

Post by Scout2Win » Sun Sep 06, 2015 1:07 pm

Hello,

I have a SQL command inside a procedure:

SET @cmd='start /WAIT C:\Go.vbs'
EXEC master..xp_cmdshell @cmd;

The script just run this code:

set iim1= CreateObject ("imacros")
iret = iim1.iimOpen ()
iret = iim1.iimPlay("C:\NBA.iim")

If I run the script manually works fine.
If I execute the script through the SQL procedure, then the iMacro gets stuck on the line

URL GOTO=http://www.NBA.com

What I am making wrong?

Daniel
Tom, Tech Support
Posts: 3491
Joined: Mon May 31, 2010 4:59 pm

Re: IMacro stuck when ran from SQL xp_cmdshell

Post by Tom, Tech Support » Mon Sep 07, 2015 11:02 am

Hi Scout2Win,

Is the Go.vbs script running in an interactive user session? It might be that this site does not load/work well unless it is running in such a session, e.g. under a user account that is logged in and has an active desktop.

For more information, Please see this article.
Regards,

Tom, iMacros Support
Post Reply