1
1
I have computers where quite a few users log in. I want to restrict the usage to a maximum of 12 hours after which an ahk script logs off the user. I have the following solution but couldn't figure out the last part of it:
- Convert ahk script to exe.
- Launch the exe as a scheduled task at user logon
https://stackoverflow.com/questions/5427673/how-to-run-a-program-automatically-as-admin-on-windows-startup
Joshua Frank's answer to a different question provides solution by running the task as system
. I am not able to understand how to run a scheduled task as system
. I explored the options of scheduled task but the best I can do is to run it with the highest privileges (not to mention hidden).
On a side note, is there a simpler way to run an ahk script (preferably its compiled exe) every time a user logs in, so that unless he/she is the admin, the script cannot be terminated?