Consider this: If your automation interacts with the UI of the Windows desktop, how can it do so if the automation cannot get to the UI?
This is why locked machines cannot run UI based test automation. There's not much that can be done about that. All the documentation out there talks about ways to make sure the machines are unlocked before the automation executes, from running an RDP connection and leaving it open and running on another machine where you lock THAT machine, to using VM's with a server, etc.
Sorry that there's not much better news, but UI interaction requires a UI to interact with so you need to find some way of activating the UI for the automation to run.
Here's the official documentation on this:
http://smartbear.com/support/viewarticle/12567/