KpyM Telnet/SSH Server - Forum
Restart allusers script
PJT Restart allusers script
Is is possible to restart the allusers script once the script is finished? ie the user has logged off

Kroum Grigorov
You can implement a sort of logoff script, but it will work ONLY if the user exits command promt using the exit command.

1) in kts.ini set shell_command to:
shell_command="%COMSPEC% /C "scripts\session.bat""

2) create the file "scripts\session.bat":
@echo off

echo login commands go here

rem starting command promt

echo logoff commands go here

It tells KTS to start session.bat file upon login. The first section in session.bat file is executed immediately; followed by %comspec% that starts command prompt and by the final section that is executed after command prompt is closed.
Unfortuntely this will work only if you close command prompt using "exit" command, if you just disconnect your client the process will die immediately without processing the logout section.

I will consider adding "real" logoff script in the next minor KTS release.


thanks for the response. much appreciated



© 2007 - 2008 Kroum Grigorov
Powered by phpBB © 2001, 2005 phpBB Group