We run a program started from a Widows Service (ShellExecuteEX). This programa prints a document (DOC for example). The problem is when the document needs some interation (like exceed the margins), because the application (Word for example) prompts a message and I don't have how to responds to this prompt. To resolve this we test the need to a response and send a using the follow code: keybd_event VK_ENTER, 0, 0, 0 ' press ENTER keybd_event VK_ENTER, 0, KEYEVENTF_KEYUP, 0 ' release ENTER This is ok when we run the program from the desktop or check the "allow service to interact with the desktop" checkbox at the service properties. The problem is that its run at the server and this server may not be logged in forever. If we logout the program aborts.
## Deliverables
An example do test and confirm that is ok. Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
Windows NT 4.0, Windows 2000, Windows XP