Results 1 to 8 of 8

Thread: Sending keys to windows 7 lock screen

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    27

    Question Sending keys to windows 7 lock screen

    Hey there,

    I am trying to remotely unlock my lock screen on a windows 7 system by using the: sendkeys command.

    I got it working fine on notepad but it wont work when its locked. The sended 'keys' wont appear in the lockscreen while it has the focus.

    Is there a way to bypass this? Or even better, is there a way to unlock it with a simple shell command?

    Thanks in advance,

    Jason8100

  2. #2
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: Sending keys to windows 7 lock screen

    Option Explicit
    Private Declare Function LockWorkStation Lib "user32.dll" () As Long
    Private Sub Command1_Click()
    LockWorkStation
    End Sub

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Sending keys to windows 7 lock screen

    Quote Originally Posted by useruseronline View Post
    Option Explicit
    Private Declare Function LockWorkStation Lib "user32.dll" () As Long
    Private Sub Command1_Click()
    LockWorkStation
    End Sub
    Not sure why you think that would work. First of all he wants to unlock it rather than lock it and you can not click a command button when the workstation is locked.

  4. #4
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: Sending keys to windows 7 lock screen

    he wrote lock screen in thread title bro , i thought he wonts to lock it

  5. #5
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Sending keys to windows 7 lock screen

    Yes the title could be confusing. I took it to mean that he wants to send keys to the lock screen, most likely to unlock it which is pretty much what is indicated in the first post.

    As for the actual question, I am not aware of any way to remotely unlock the computer other than of course connecting to it with a remote desktop connection which would start a new user session.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    27

    Re: Sending keys to windows 7 lock screen

    hmmm okay, and what about creating my own lockscreen. where would i start?

    How do i secure it from being bypassed with lets say ctrl + alt + del?
    Last edited by jason8100; May 28th, 2012 at 06:32 AM.

  7. #7
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: Sending keys to windows 7 lock screen

    why should u create ur own screen , just protect the orginal one from ctrl alt dlt by disabling this function

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    27

    Re: Sending keys to windows 7 lock screen

    Quote Originally Posted by useruseronline View Post
    why should u create ur own screen , just protect the orginal one from ctrl alt dlt by disabling this function
    Because i want to lock and unlock my pc remotely and since the normal lock screen wont do this, making my own lock screen would be a solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width