Skip to main content
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
------------------------------