How can I make Windows ask for user credential on login only on specific days, or any other time range?
Inspired by this question only for linux, it give me the same idea because I have similar problem.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityHow can I make Windows ask for user credential on login only on specific days, or any other time range?
Inspired by this question only for linux, it give me the same idea because I have similar problem.
I love making ugly hacks to achieve things in Windows, so here's a possible solution :) I haven't tested it, but it sounds possible.
See this article on SuperUser for setting up automatic login in Windows 7. It involves changes in the registry, so be sure to make a backup first. - Also please note, your user must have set a password for the next steps to work.
Open Notepad and type in the following:
rundll32.exe user32.dll, LockWorkStation
Save it as LockDesktop.bat (name doesn't matter, just an example).
Please note: if it gets saved as LockDesktop.bat.txt, you must disable hiding file extensions so you can rename it properly to .bat. Open Windows Explorer, press the Alt button, click Tools -> Folder options -> Switch to the View tab -> unmark Hide extensions for known file types -> click OK. Now you should be able to rename it properly to LockDesktop.bat
Open Task Scheduler
Create Basic Task
Type "LockDesktop" in the name
Choose your preferred method for triggering the task, for example daily
Make necessary changes depending on your previous method for triggering, or leave empty
Pick Start a program
In the Program/script: text field, enter the path to your bat file. For example C:\LockDesktop.bat
Finish
Everytime the task runs, it will run the bat file which basically locks your computer. You will then have to press CTRL+ALT+DEL and enter password to log back in.
Let me know how it goes :)