MIchaelfjsmith2 Posted September 12, 2014 Share Posted September 12, 2014 does anyone know if the following command has been blocked from use Send("#l") I am trying to have a script lock the screen but am having no luck. Does anyone have an alternative solution. Thanks, Link to comment Share on other sites More sharing options...
Moderators Solution JLogan3o13 Posted September 12, 2014 Moderators Solution Share Posted September 12, 2014 ShellExecute("rundll32.exe", 'user32.dll,LockWorkStation') nirmalsalem 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AdamUL Posted September 12, 2014 Share Posted September 12, 2014 You could also use _WinAPI_LockWorkStation. Adam Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 12, 2014 Moderators Share Posted September 12, 2014 Which I believe uses the same dll (correct me if I'm mistaken, someone who knows) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MikahS Posted September 12, 2014 Share Posted September 12, 2014 You are correct JLogan Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
MIchaelfjsmith2 Posted September 12, 2014 Author Share Posted September 12, 2014 Thanks guys both worked great. Would either of you be able to tell me how i could unlock it by autoit also? Thanks, Link to comment Share on other sites More sharing options...
JohnOne Posted September 12, 2014 Share Posted September 12, 2014 You cannot. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 12, 2014 Moderators Share Posted September 12, 2014 Think about what you're asking for, then see below. "To unlock the workstation, the user must log in" http://msdn.microsoft.com/en-us/library/windows/desktop/aa376875(v=vs.85).aspx "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MIchaelfjsmith2 Posted September 12, 2014 Author Share Posted September 12, 2014 Yes i understand that. What i am trying to accomplish is. I have an autoit script running on my computer that looks for a specific file on a usb stick. so when that usb stick is plugged in if it has that file it will login for me. when i unplug it the computer will lock. i have the script functioning properly when replacing the lock/unlock with a run/process close. Link to comment Share on other sites More sharing options...
Xandy Posted September 12, 2014 Share Posted September 12, 2014 (edited) It is my understanding that the process of login cannot be automated. Anything's possible though. Edited September 12, 2014 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
JohnOne Posted September 12, 2014 Share Posted September 12, 2014 Yes i understand that. What i am trying to accomplish is. I have an autoit script running on my computer that looks for a specific file on a usb stick. so when that usb stick is plugged in if it has that file it will login for me. when i unplug it the computer will lock. i have the script functioning properly when replacing the lock/unlock with a run/process close.You cannot. Think about what you're asking for, then see below. "To unlock the workstation, the user must log in" http://msdn.microsoft.com/en-us/library/windows/desktop/aa376875(v=vs.85).aspx AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 12, 2014 Moderators Share Posted September 12, 2014 What you're talking about is two-factor authentication - which I doubt you're going to accomplish with an AutoIt script on a USB. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bert Posted September 12, 2014 Share Posted September 12, 2014 I know what you could do....Have a script running that puts up a splash screen that fills the entire screen. The only way to hide it is to put in your USB stick. WHen the script sees the stick, it hides the splash screen. You remove the stick, it puts the splash screen back. This is not 100% secure for CTRL-ALT-DEL can close the script but you have to know what your doing. May I ask however - why not simply use the Windows key +L to lock the workstation when you leave the workstation and then use your password to get back in when you come back. Pretty much everyone else does that and it works great. 232showtime and Xandy 2 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted September 12, 2014 Share Posted September 12, 2014 IF you do not want to type in a password, get a fingerprint scanner. Touch the scanner and you are back in. Easier than plugging in a USB flash drive and you won't lose your finger...unless you cook, or use a chainsaw, or play with knives.... The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 12, 2014 Moderators Share Posted September 12, 2014 Better yet, get a badge with a proximity sensor. All you have to be is within 5 feet. 232showtime 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now