• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Control winlogon with Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 found a beautiful pie. And a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic