Well code was posted to lock the screena nd suggestions were made to use files. So your goal is to store passwords right, and not lock the station? To store passwords use encrypted file like said. Another way to lock it is:
Shell "rundll32 user32.dll,LockWorkStation"