I am using the Windows Task Scheduler to start an elevated administrator program when a user logs on. The technique is based on this article:
Note: The elevated administrator program is an automated test program, which needs to run as administrator to install programs and run various tests. Some of the tests require administrator rights and access to the desktop.
The task is configured to run at above normal priority as described in this article:
Everything works fine on Windows Vista, Windows 7 and Windows Server 2008.
On Windows 8 and Windows Server 2012 the performance of test program is terrible, typically taking 5 – 10 times longer to run. CPU usage and Disk I/O are both very high. Process Hacker (http://processhacker.sourceforge.net/) shows I/O Priority as Normal, and Page Priority as Normal.
The poor performance only happens if the test program is run by the task scheduler during logon. If I stop the test program and re-start it by running the task scheduler task manually, normal performance is restored.
Here are some numbers from a cut down version of the test program:
- From test program run from user login: Time 37.6 seconds, Page Faults 4530, Peak WS 17.8M
- Same test program after manual restart: Time 1.1 seconds, Page Faults 4383, Peak WS 17.7M
Any help would be appreciated.