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
Problem Running Macro When Remote Session Closed
Moderators: Dorian (MJT support), JRL
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.
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]
[email protected]
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
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
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]
[email protected]
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
Thanks,
Danielle
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
I have replied to your support ticket with a solution using DoLogon and a startup macro.
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?