Hy.. i'm trying to create a script to when the user close the last session of accuterm he executes the logout from windows server ...
so far i have this
Sub CustomExit()
Dim n As Integer
Dim s As Session
n=0
For Each s In Sessions
n=n+Abs(s.Connected)
Next
'If n > 0 Then Beep Else AccuTerm.Terminate
Cmd = "c:\\windows\\notepad.exe"
MsgBox "Numero de sessoes " & n
If n < 0 Then Beep Else AccuTerm.Terminate
End Sub
Sub CustomClose()
If ActiveSession.Connected Then Beep Else ActiveSession.Close
End Sub
i'm using Notepad just for testes
in the shortcute of accuterm i put "C:\\Program Files (x86)\\Atwin71\\atwin71.exe" Finaliza1.atsc
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.