Does anyone have any ideas how I can cancel a user's log off?
I need to be able to deny log off ability if a certain application is open.
BTW - I'm running log off scripts in a 2003 AD domain. Clients are all XP.
Does anyone have any ideas how I can cancel a user's log off?
I need to be able to deny log off ability if a certain application is open.
BTW - I'm running log off scripts in a 2003 AD domain. Clients are all XP.
You can see this regarding disable the log off option. Disable Logging off in Windows Vista/XP
I don't want to prevent people from logging off at all times. I want to prevent them from logging off if a particular application is open.
Just wanted to know the objective. Why would you want to prevent users' from logoff if application is running?
What app is this?
Is it required by the app that whoever logs in, should not log off?
Or is it that users that login, use the account (username) that is used to run this app?
Please clarify...
The application has issues if it isn't exited gracefully. We need to force the user to close it properly. We've been able to control all possible exit scenarios except the case where the user just logs off.
Are users logging in using the same username that is being used to run the app; OR are they logging in using their own usernames
Also let me know the username that is used to run this app?
What is the name of this app, if you may?
It happens only if Task Manager is not running under administrative privileges. In order to log off an user account, Task Manager must be run with administrative privileges. Follow the below steps mention.
Method 1
- Open your Task Manager (taskmgr.exe) and then click on the Processes tab
- Then Click on Show processes from all users
- Afterwards when it prompts for an administrator password or confirmation, type the password or provide confirmation.
(Now the Task Manager will runs with administrative privileges.)
- Then try to switch to the Users tab and log off an user account.
Method 2
- Then Click on Start Menu, select All Programs, then click on Accessories, then right-click on Command Prompt, and then click Run as administrator.
- If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
- Then on the command prompt, type taskmgr.exe, and then press ENTER.
(Now Task Manager starts with administrative privileges.)
- Now you would be able to Switch to the Users tab and log off an user.
account.
Solomon,
I want to prevent a user from logging off, not how to log off a user (if I read your post right).
BTW - users do not have local admin privileges.
- Click on Start and then Run and type in gpedit.msc and press Enter.
- Navigate to User Configuration > Administrative Templates and now click on Start Menu and Taskbar.
- On the right side, double-click on Remove and prevent access to Shut Down command.
- Set it to Enabled. This option removes the shutdown option from the Start Menu but the system still can be shutdown via the command prompt also.
- On the same User Configuration pane, scroll down to find Remove Logoff on start menu and set it to Enabled. In Group Policy you can also configure to allow shutdown of the computer when some other user is logged on.
- Go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.
- Now scroll down to Shutdown: Allow the system to be shutdown without having to log on.Double click on it and set it to Disabled.
- The last thing you need to do is to prevent other users from shutting down the computer using command prompt. To apply the setting, navigate to:User Configuration > Administrative Templates > System, double-click on the Prevent access to the command prompt and set it to Enabled.
- All these settings will be applicable to all the users except administrator. In this way to you will be able to restart your computer and log in as an administrator to change back the settings.
Calvin,
I've already set up controls on shutting down the system. The issue I have is preventing log off when a particular application is running.
Ok, I was able to make this happen. What I did was remove the log off from the start menu and the Ctrl-Alt-delete via GP. I then created a link on every PC's desktop labelled "Log Off". This link is to a vbscript on one of our servers. The vbscript checks to see if the application is running. If it is, it tells the user and doesn't allow them to log off until they close it.
Problem solved!
Bookmarks