Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use perl to logout

Status
Not open for further replies.

Stevoie

Programmer
Jun 7, 2001
68
IE
Is it possible to get a perl program to logout a user in win2000? eg user presses a button in a perl tk window and windows logs them out.

thanx
StevoIE
 
I don't know about Windows 2000, but in Windows 9x there are batch files in the windows directory to shutdown and reboot, so I'm guessing that there is one to log out in Windows 2000. //Daniel
 
i was hoping someone would know what dll's are involved or maybe someone has already written something like what I need to do.
StevoIE
 
If you want to do it the hard way, you are using the wrong language ;-), because Perl can't use functions defined in DLLs. //Daniel
 
I haven't tried it with NT or 2000 but I used the following command on a Win 95 computer.

RUNDLL32 USER,EXITWINDOWS


It might work, or you can look on MS website for help.

HTH
tgus

____________________________
Families can be together forever...
 
found it:


$exitWndwEx = new Win32::API('user32', 'ExitWindowsEx', [N,N], N) or die print "User api failed: $!";
if(not defined $exitWndwEx )
{
die "Can't import API User: $!\n";
}
$exitWndwEx ->Call(0,0) or die print "Logout Call failed: $!";
StevoIE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top