Wednesday, September 7, 2016

How to Resolve - Can not get Task Scheduler to perform a forced log out after X number of minutes. Task runs but does nothing.?

Can not get Task Scheduler to perform a forced log out after X number of minutes. Task runs but does nothing.

I am a lab manager and we are testing windows 7 for implementation on our campus.
I have my local polices in place to lock down the student user account (we are not using a domain...yet).
All of that seems to be working as expected.
My issue is when a student saves data to the desktop, downloads, and documents folders and also leaves programs open.
The file issue we resolved with a .bat script that runs on every login that deletes all files and folders from the aforementioned directories.
So the issue remaining is the need to have the user account log out when not being used so that any windows that may be open and/or minimized (especially ones that might have ____ pulled up for the next unsuspecting user) can be shut down and the file deleting
script can run again to clean the files off.
So here is the process I have gone through.
I open task scheduler and I create a new task named "User logout".
I have it set to run whether the user is logged in or not (just in case it is required to run on all other user accounts) and to run with highest privileges.
I have the trigger set to "On Idle"
The action is set to run the program shutdown.exe with the switched /f (to force any programs closed) and /l (to log out)
NOTE: If I run this command directly from the command line, it shuts down all programs and logs out correctly.
Under conditions I have the "Start task only if the computer is idle for:" set to 1 minute (I know that windows checks for idle state every 15 minutes).
I have also tested this setting set to 15 and 30 minutes as well as having this not selected at all.
I have options in settings checked as well but they do not really matter in the basics of this unless it fails.
Main one that is checked for purposed of this rundown is "allow task to be run on demand".
So I save the task and then try running it manually, but nothing seems to happen.
I check the Task history and it reports that the task ran successfully.
Problem is that it did not actually log out, so it didn't run successfully.
here are the items from the history:
Task Scheduler launched "8fd60c4d-217a-4e07-b762-06099f7f7ecf"  instance of task "\User logout"  for user "admin" .Task Engine "S-1-5-21-2379419291-1717419969-4042503681-1000:LIB101--006\admin:Password:Highest"  received a message from Task Scheduler service requesting to launch task "\User logout" .Task Scheduler launch task "\User logout" , instance "shutdown.exe"  with process ID 1568.Task Scheduler successfully completed task "\User logout" , instance "8fd60c4d-217a-4e07-b762-06099f7f7ecf" , action "shutdown.exe" with return code 1.Task Scheduler successfully finished "8fd60c4d-217a-4e07-b762-06099f7f7ecf" instance of the "\User logout" task for user "LIB101--006\admin".
The fun part is if I do this same exact process but use the switch of /r (reboot) instead of /l it works like a champ and reboots the machine completely.
So I am not sure what is wrong.
is this just a bug with task scheduler and the /l switch?
Before someone suggests just setting the screen saver to log out, please be aware that it is not a full log out of the account, so it does not close programs nor does it run start up items again, which completely defeats the purpose.
If I am missing a setting
or something in regards to this, please let me know.
I really hope someone can help with this issue.
I am really pulling my hair out trying to get it to do what I want.

Anwsers to the Problem Can not get Task Scheduler to perform a forced log out after X number of minutes. Task runs but does nothing.

Download SmartPCFixer to Fix It (Free)

Use the System File Checker tool to repair corrupted or missing system files:

  1. Click Start.
  2. Type cmd, and then press CTRL+SHIFT+ENTER to open the elevated command prompt (I.e. Command prompt with administrative rights).
  3. The User Account Control window should appear, be sure that the action it exhibits is correct, and then press the Continue button.
  4. Type or copy paste the below command line into it without quotes:
  5. "Sfc /scannow"

Recommended Method to Repair the Problem: Can not get Task Scheduler to perform a forced log out after X number of minutes. Task runs but does nothing.:

How to Fix Can not get Task Scheduler to perform a forced log out after X number of minutes. Task runs but does nothing. with SmartPCFixer?

1. Download Error Fixer . Install it on your system.  Click Scan, and it will perform a scan for your computer. The errors will be shown in the scan result.

2. After the scan is finished, you can see the errors and problems which need to be fixed.

3. When the Fixing part is finished, your computer has been speeded up and the errors have been fixed

Related: How to Download Toshiba Satellite A205-S5833 Supervisor Password Utility v. r2 driver,How to Download Toshiba Satellite C675-S7104 Laptop Checkup v. driver,How Can I Update & Download Toshiba Satellite L655-S5117 Face Recognition v.3.1.3 driver,Method to Update & Download Toshiba Satellite L845D-SP4328KL Atheros LAN Driver v.,How to Update & Download Toshiba Satellite R930 Network Device ID Registry Setting Tool v. driver,Best Way to Download NVidia GeForce 6100 VGA Driver v.304.51 Certified,How Can You Update & Download NVidia GeForce 9300/nForce 730i VGA Driver v.310.19 Certified,Method to Download NVidia GeForce GT 330M Driver v.340.65,How Can I Update & Download NVidia GeForce GTX 590 Driver v.280.26 WHQL,Method to Download NVidia Tesla C2050 Driver v.319.17,Way to Download RealTek RTL8100C(L) Driver v.5.01,Way to Download RealTek RTL8100E Drivers v.694,Way to Update & Download RealTek RTL8101L Auto Installation Program v.6.110 driver,Method to Update & Download RealTek RTL8111G PXE and RPL ROM code v.2.58 driver,How to Update & Download RealTek RTL8411B(N) Driver v.10.003,Best Way to Update & Download ASUS A53SV nVidia Graphics Driver v.,Method to Herunterladen ASUS K75VJ Intel Rapid Storage Technology Treiber v.,How Can You Update & Download ASUS CG8580 Intel Chipset Driver v.,Method to Update & Download ASUS K41VD Intel INF Update Driver v.,Way to Update & Download ASUS Pro70T NB Probe v.3.0.0026 driver
Read More: How to Fix Problem - Can't create restore points in Windows 7?,Troubleshooter of Error: Can ping sites but IE 7 & 8 not browing in Vista. Firefox is OK.,How to Fix - Can not update Windows 7 SP1-by using Windows Update or from Microsoft Download Center.?,How to Fix Problem - Can I shrink the system drive in windows 8??,Troubleshoot:Can someone give me a formula that will sort a column alphabetically? Error,Can I safely remove earlier versions on my pc,Can I rotate a graph so it shows on my page sideways?,Can I safely ignore Office file validation alert message?,Can I send a JPEG file in a PDF form ?,can I review when my computer has been accessed from outside my home?

No comments:

Post a Comment