wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes Control winlogon with Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Control winlogon with Java" Watch "Control winlogon with Java" New topic
Author

Control winlogon with Java

Anis Yusof
Greenhorn

Joined: Sep 24, 2010
Posts: 3
Guys,

I need to code up an application that actually controls the PC's login and logout via a handphone(Android phone). The user initiate the login and logout through the handphone, wirelessly. I have set up a listener on the computer, listening for login or logout commands from the phone. I've managed to set up the log out function on the listener, which interface with the cmd via the code below.

This code will log off the current account and return to the account selection screen (Windows 7). But now, how do I code up the listener so that, when the user initiate a logon request from the phone(assuming the credentials are provided from the phone), the PC will be logged in based on the credentials?

After some googling, I've found some methods, but it does not work. I tried using system call such as executing "logon -u userName -p 12345", but unfortunately win7 does not support "logon" command. Other solution such as executing "net user" also does not really fit into my current situation. Maybe, is there a way for me to control winlogon.exe from the listener(which is coded in Java)?

Thank you very much for your kind help! Do hope you provide me some answers or advice on how to advance from here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Control winlogon with Java