New
#1
Lock screen after specific app quit : How to?
Hello,
I need lock screen to launch right after a specific app quit. I looked in task scheduler but lack knowledge. Can i do it within or i need another app?
Thanks.
Hello,
I need lock screen to launch right after a specific app quit. I looked in task scheduler but lack knowledge. Can i do it within or i need another app?
Thanks.
This is how to do it with a batch file:
- Locate the EXE file or shortcut of the application. I am using MsOffice Excel in this example, in my system the program EXE file is called EXCEL.EXE and it is located in C:\Program Files\Microsoft Office\Office15\ folder
- Open Notepad
- Type these two lines to a new text document, replacing the program or shortcut path with your program or shortcut. If using shortcut, the extension is .lnk:
Code:"C:\Program Files\Microsoft Office\Office15\Excel.exe" rundll32.exe user32.dll, LockWorkStation- Save the file to desktop selecting Save as type as All Files, remember to end your chosen filename with extension .bat:
.
(Click to enlarge.)
That's it. To run the program, Excel in this example, user now double clicks the icon of this batch file on desktop. This opens the program. As soon as user exits the program, Excel in this example, computer is locked.
Kari
Unfortunatly that won't do for me : i wanted to use for a screensaver that can't be used normally (incompatibility on x64 systems..) but it i input the screensaver location it will launch.. its settings! And if i make a shortcut of it, it'll directly go to lock screen (tried with jpg file instead, same, doesn't launch, direct lock screen)
The batch file I told you how to create works without issues. It launches a program and after the program is finished goes to lock screen. The batch works perfectly.
If you have problems to get your programs to work, it has nothing to do with this batch file. Start a new thread and ask help. Notice that there's no way to get a program to work on x64 system if the maker tells it's not x64 compatible.
Kari
Sorry but no. The app itself launch, but it I use the bay it directly went to lock screen.. I will try again but well..
Try it with any screensaver (making a shortcut if it) and tell me what happens.
Of course it does not work with screensavers! It works with programs and applications. A screensaver (.scr file) is not a normal application per se; the lock screen command in batch file is as "exit" command for a screensaver so it shuts down and proceeds to lock screen.
If you want to automatically go to lock screen after screensaver has closed (mouse movement or keyboard press), you need to set the highlighted option on screensaver settings:
Kari