Problem Running Macro When Remote Session Closed

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
DanielleK
Newbie
Posts: 4
Joined: Thu Jan 26, 2006 2:33 am

Problem Running Macro When Remote Session Closed

Post by DanielleK » Thu Jan 26, 2006 2:43 am

I am having a problem running a script when my remote session is closed. I am still logged into the server, but I just close my remote session. On the server, I have Macro Scheduler running and all setup. When I am Remoted In, the script runs fine. The problem is when my Remote session is closed, the script gets hung up on logging into my app in which I am running an extract from. Is it possible to run Macro Scheduler like this? I have tried many set focus attempts and nothing seems to work. Here is a snippet:
Run>C:\EQDLQW\EQDLQW.exe
WaitWindowOpen>Equal*
WaitWindowOpen>User*
Wait>0.3
// Focus the app
SetFocus>Equal*
SetFocus>User*


//Recorded Events
Wait>0.34
Send>blah
Press Tab
Let>SK_DELAY=20
Send>blah
Wait>0.34
Press Enter

Any help on this would be greatly appreciated.

Thanks,
Danielle

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Jan 26, 2006 9:08 am

Hi,

When you close the remote session it logs the session out on the server. So Macro Scheduler will be exited. When you log back iin remotely the session is reopened and Macro Scheduler started again. The solution would be to either use VNC/PCAnywhere/RAdmin, instead of windows remote desktop/terminal server, to leave the session logged in. Or use Macro Scheduler 8.0's scheduler service so that when Macro Scheduler is exited the scheduler service takes over. You may also need to set up AutoLogon and Run As User if your macro needs to access GUI objects or objects that require user level authentication.
MJT Net Support
[email protected]

DanielleK
Newbie
Posts: 4
Joined: Thu Jan 26, 2006 2:33 am

Post by DanielleK » Thu Jan 26, 2006 3:22 pm

Hello!
Thank you for your quick response. I have tried a couple things here. First, I have been using the scheduler service to kick of the macro but it is still failing on the login into the gui app. I also tried using autologin but this didn't work either. I can see in the logs it is going through each step, but for some reason, it is not putting the user/pw into the popup window, to start the gui app. Again, this only happens when I do not have my remote session up and running...it is happening even when Macro is running from the schedule and when I am stilll logged into the server.

Please let me know what else I could try...

Thanks,
Danielle

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Jan 26, 2006 4:17 pm

Did you set up Run as User Aswell as autologon? The service can only run under system account so the macro needs to mimic the user to have same access. There may still be situations where system services mimicing a user are not allowed the same eccess to certain objects. The best solution is to leave the machine logged on to avoid this issue. Another solution would be to use autologon independently, schedule autologon, set the macro to run on startup and have the macro log off afterwards. We can send you an exe which runs autologon directly.
MJT Net Support
[email protected]

DanielleK
Newbie
Posts: 4
Joined: Thu Jan 26, 2006 2:33 am

Post by DanielleK » Thu Jan 26, 2006 9:26 pm

Yes, I set it up to run as user, and supplied the admin login info, this didn't change anything. I have been leaving the machine logged in, then just setting up a schedule to run at night, while I am not connected remotely, but still logged into the server. It definetly kicks off the macro, just fails on logging into the gui app in which I am running an extract from. Any other suggestions? I created the macro as an exe to try it as a windows schedule, but this failed the same way...

Thanks,
Danielle

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Jan 28, 2006 3:32 pm

Hi,

I have replied to your support ticket with a solution using DoLogon and a startup macro.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

DanielleK
Newbie
Posts: 4
Joined: Thu Jan 26, 2006 2:33 am

Post by DanielleK » Tue Jan 31, 2006 12:49 am

I tried using your login script but got the same results. I am not sure if the problem is a focus issue or a send issue but it is failing everytime on the send>username part, again, only when I am not in my remote desktop session.

Any other suggestions?

Thanks,
Danielle

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts