KpyM Telnet/SSH Server - Forum
Restart allusers script |
PJT |
Restart allusers script |
Jul 22 2006 02:27 |
|
Is is possible to restart the allusers script once the script is finished? ie the user has logged off
|
Kroum Grigorov |
|
Jul 22 2006 08:27 |
|
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:
[code:1:61c7a1c7c2]shell_command="%COMSPEC% /C "scripts\session.bat""[/code:1:61c7a1c7c2]
2) create the file "scripts\session.bat":
[code:1:61c7a1c7c2]@echo off
echo login commands go here
pause
rem starting command promt
%comspec%
echo logoff commands go here
pause[/code:1:61c7a1c7c2]
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.
Kroum
|
PJT |
|
Jul 24 2006 04:10 |
|
thanks for the response. much appreciated
Paul
|
© 2007 - 2008 Kroum Grigorov