How can I automatically run a script when I log on to Windows?
I'd like to run something like this whenever I log into my computer:
echo %USERNAME% logged on at %DATE% %TIME% >> log.txt
A bonus would be to be able to run the same script whenever I unlock the screen saver as well.
You can create a scheduled task that will run when your computer is unlocked:
Also, I tweaked the path in the script to read
echo %USERNAME% logged on at %DATE% %TIME% >> %USERPROFILE%\log.txt
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments