Questions tagged [logoff]
106 questions
3
votes
2 answers
C++: cleanup actions in response to Windows logoff
I want to catch a Windows logoff event so that I can do some cleanup. My WindowProc looks like this:
switch (uMsg){
case WM_ENDSESSION:
case WM_DESTROY:
PostQuitMessage(0);
return 0;
// other messages
}
return DefWindowProc(hwnd, uMsg,…

user1763950
- 31
- 1
2
votes
6 answers
Why does an application running as the system account on windows when logging off
I have a c# application which is launched under the System account on a machine and presents some dialogs to a user. When a regular user logs off the application is terminated as well. I would have thought that since its running under the system…

Trotts
- 625
- 5
- 14
2
votes
2 answers
Log off users remotely
found this script to log off a single username
$scriptBlock = {
$ErrorActionPreference = 'Stop'
try {
## Find all sessions matching the specified username
$sessions = quser | Where-Object {$_ -match 'username'}
…

Wiktor
- 581
- 1
- 12
- 23
2
votes
4 answers
How to capture that session logoff started from windows service
I have a service which constantly checks some application and assures that it wasn't closed. If this app closed - service launches it again.
The problem starts when user decides to log off the session. During logoff all applications are closing…

Volodymyr K.
- 669
- 8
- 20
2
votes
3 answers
User loggoff time
I am developing a new Asp.net MVC application and it is important for me to see the logged in users and if the logout time for them, If the user click on the logout button it is ok for me. But most of the times the users navigate through the…

Tarek Barca
- 21
- 3
2
votes
1 answer
How to logoff user while the user's session is locked
I'm developing an application to run in the background for capturing a user's activity on their system, like logoff/shutdown/idle/switch user/continues press of any key/system lock etc.
It's working fine and I am able to track all activities, now I…

Ashish Rathore
- 2,546
- 9
- 55
- 91
2
votes
1 answer
In Linux, how do I log a user out after idle period, even when they are still in a program
I am trying to enforce a policy that logs an idle user out of a bash shell session, even when they are in an active process like a script-based menu, or vi session.
I have tried using "export TMOUT=x" where x is the number of seconds, but this only…

Ryan
- 89
- 1
- 7
2
votes
0 answers
Undesired logout in MVC 4
I have this issue after publish project in host, in development environment everything is OK!
In my published MVC 4.0 website when an authenticated user try to upload a picture, the user has been logged off and redirected to the Login Page.
I've…

Saeed M. Farid
- 33
- 5
2
votes
1 answer
How do I give reason while Restarting Windows via bat file
I was using bat file to restart my windows server.. While restarting the server it is asking for restart reason, how can i give the reason through the same batch file.
Command which i am using in bat file is shutdown.exe -r -t 00.

user2525932
- 21
- 1
- 2
2
votes
1 answer
auto logoff from all apps on android
i want a functionality where i can log off from all the apps on android ie: auto logoff from skype , facebook , yahoo.
Is a some app already available for this or some easy way to implement this. I tried clearing all the cache but does not log out…

Gaurav_soni
- 6,064
- 8
- 32
- 49
1
vote
0 answers
SetSuspendState() hangs up, why?
I was wondering why the following happens?
I need to log off users and then put computer to sleep. I do the following (C++/WinAPI):
(Calling the following from the local system service):
WTSLogoffSession(WTS_CURRENT_SERVER_HANDLE, dwUserSessionID,…

ahmd0
- 16,633
- 33
- 137
- 233
1
vote
3 answers
Stop application when user initiates a log off / shutdown operation
I have this application (Windows form application written in Visual C++) from a colleague of mine and I face some serious problems. The application is neither a service neither a normal application, I mean it has a GUI but most of the time it runs…

SebiG
- 15
- 5
1
vote
3 answers
Logoff remote system using c++
I am looking for an API to logoff current user on remote computer. Two
functions ExitWindows and InitiateSystemShutdown seem not exactly what I
want. The first one doesn't accept computer name, the second one doesn't
have logoff option.is it…

Kaarthikeyan K
- 11
- 2
1
vote
1 answer
How to run a fully functional batch file from a python script?
I look after a Lab with a number of Rigs in it and I am developing an automated process for running experiments. The trigger for loading the experiments is to use a particular username. I have a flowchart that identifies behaviours when logging on…
1
vote
4 answers
Prevent Dialog Box From Preventing User Log Out?
We have a simple .app made with applescript editor that pops up a display dialog box when a user logs in. The problem is that many users ignore the box and don't press "ok" to close it. If it's left open it will prevent the user from logging off…

Igorio
- 918
- 1
- 7
- 17