Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

screen/computer lockout  RSS feed

 
Megs Maquito
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can I create code that will lock the computer? I'm trying to create a software that can remotely lock/unlock a computer running on windows xp.
Basically if I know how to create a method to lock/unlock the computer locally (that is keyboard is unusable and screen is blank/blue) then I will call that method remotely through RMI.

TIA

BTW, computer will be on local network only.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing in the standard Java API to do this. You will probably need to write some native code and call that via JNI, or if you have a small executable program which can do this you might be able to call it via Runtime.exec(...).
 
Megs Maquito
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the quick reply Jesper
 
Megs Maquito
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's seems to be a way to lock it but no way to unlock it remotely. If I use Full-screen exclusive mode of awt do you guys think this will do the trick?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!