Hi,
Send key not working when system is locked.Is there any way to overcome this issue?

From reading, it looks like you need to run your program as SYSTEM
If you go into Taskmanager and look at processes, the "User Name" column needs to say SYSTEM instead of your username.

Can you please explain how to make it a system process or is there any alternate method for send key.

Try running the application as a windows service. Open the command prompt and type:

sc create MyNewService binPath= "PATH_TO_EXE"

(replace MyNewService with the service name and PATH_TO_EXE with the path)
I think you need to reboot afterwards to get it running.

Thanks for your response but when i tried to start the process by going to services window .It is showing an error (Error 1053: The service did not respond to the start or control request in a timely fashion).I think it may cause because i don't have the administrative rights.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.