Running macro when workstation is locked

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Qaiser Javed

Running macro when workstation is locked

Post by Qaiser Javed » Thu Feb 10, 2005 6:40 pm

Is it possible to run a macro when the machine is locked i.e. when i press Ctl+Alt+Del to lock the machine? It is a windows xp machine and i use remote desktop to connect to it. When i disconnect by clicking on x, without actually logging out, the machine gets locked. I want the macros to be able to run in this state because i'm not actually logged out but still logged in. But i get this kind of error: A call to an OS function failed. What's happening? Or it is just not possible?

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

Post by support » Thu Feb 10, 2005 8:57 pm

Depends what kind of macro it is. Most won't work because they need to simulate user activity which can't be done if the console is not present. See the following for details:
http://www.mjtnet.com/index.htm?msfaq17.html
MJT Net Support
[email protected]

Qaiser Javed

Post by Qaiser Javed » Thu Feb 10, 2005 9:51 pm

Thanks. This explains what's happening. My macro uses GUI. I guess i'll have to keep the machine 'unlocked' all the times. I'm looking into using pcAnywhere for remote access instead of Microsoft's Remote Desktop. I hope this will eliminate the locking problem.

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

Post by support » Thu Feb 10, 2005 10:04 pm

Yes, PC Anywhere can be set to leave the console logged in. Windows Terminal Server logs it out and there is no way to override it.
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Feb 10, 2005 11:20 pm

I have a nightly Macro Scheduler routine that uses pcAnyWhere to connect and login to WIN2K system that is left on, but logged out. After logging in, I use MouseMove> to double click on an icon, on the remote system, that calls up a Macro Scheduler routine on the Win2K system,which does its work, sends a confirming email,and then logs off the WIN2K. After logout has happened, the original Macro has been waiting, and now ends the initial macro. Has been working for years with no issues.

I have to use MouseMove> to do things on the remote system because the running macro cannot capture the window names on the remote system. That is also why I noly trigger a macro on that system, to allow it to respond to WindowNames in its processing. I could also schedule the remote macro vs. being triggerer from a desktop icon. Once logged in, the scheduled macros could run OK. Only need to set the time to be later than the login time. Do not want to trigger the remote macro on login, it is only a nightly maintenance routine.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Qaiser Javed

Post by Qaiser Javed » Fri Feb 11, 2005 6:23 pm

This is a neat approach. I might implement it in the future to enforce security. Right now only security we have is the physical security of the server room itself. pcAnywhere solved the immediate problem but i'll definitely give your approach a try. Thanks.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sat Feb 12, 2005 1:04 am

Bob,

Grateful to you for sharing your pcAnyWhere idea. Do you talk to pcAnyWhere (on your Win2K Server) via internet (broadband) or phone line (tune dialing)?
Thanks.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Feb 12, 2005 1:35 am

Uses Internet TCP/IP connection.

But could start with a phone connection to connect to ISP. Then use ISP software to connect to WWW, and still use a TCP connection, even though pca originator is a phone connection.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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