aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes  log off windows user using ant script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark " log off windows user using ant script" Watch " log off windows user using ant script" New topic
Author

log off windows user using ant script

Leo Aug
Greenhorn

Joined: Sep 02, 2012
Posts: 7
How to log off windows user using ant script.

If the user is connected through rdp how to force logoff him



Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Find a windows utility app that performs a logoff and call it using the <exec> task. (Logging off Windows requires making a Win32 API call, which is more easily done by a native utility than via Java.)
See if this helps: http://ss64.com/nt/shutdown.html


JBoss In Action
Leo Aug
Greenhorn

Joined: Sep 02, 2012
Posts: 7
Thank you ....

Will try and update it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log off windows user using ant script
 
Similar Threads
log-in as ROOT with ANT
word in a log file
How to get the achieve Version of deployed webservices
App stops logging after 10 minutes
Javadoc failed: java.io.IOException: CreateProcess