Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to run a batch file which set in task scheduler without display console window, my batch need open one wpf app at the end. I tried to set Security Options in task scheduler like this, the console window really disappear but my app run in background process (display in task manager) so that I can see it in screen.

What I have tried:

I change to lock screen by using LockWorkStation() of user32.dll but I can't auto unlock it. So could I do to unlock the screen?

If can't do it, I want to display a image full screen on top while run batch to hide every thing or any else to notify user that machine under maintenance or in idle as ATM machine do. Currently, I can only open an image with maximized but not full screen. Please help me solve this.
Updated 12-Jan-23 18:35pm

1 solution

You cannot automatically unlock the workstation once locked: the user must log in.
If there was a way round this, it would be a major security problem!

What are you trying to do this for? It seems rather an odd requirement, and there may be a better way to approach it all.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900