JSI Tip 4579. How can I run Scheduled Tasks in the background when they use the account of the logged on user?

When you run a Scheduled Task in the context of the logged on user, the tasks runs in the foreground.

When you run a Scheduled Task in a context that is not the logged on user, the task runs in the background.

When you run a System State backup, the NTUser.DAT and UsrClass.DAT for the logged on user is copied to the %SystemRoot%\Repair\Regback folder, along with the Registry Hives

I wanted the Scheduled Tasks on my workstation in background, but I had to have the backup run in my accounts context.

If you never expect to get a prompt from a Scheduled Task, you can cause all the Scheduled Tasks on a workstation to run in the background:

1. Use the Registry Editor to navigate to:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon

2. Double-click the Shell Value Name, a string data type, and change the data value from the default Explorer.exe to C:\WINNT\Explorer.exe,. C:\WINNT is value of the %SystemRoot% environment variable. Note the trailing comma.

If you change the string to just Explorer.exe,, the Scheduled Task will run in the background, but if you visit the Microsoft Knowledge Base, perform a search, and then click on an article in the Results pane, a new Internet Explorer window is launched, but the text of the article will be blank????

NOTE: This behavior could change in a future service pack or OS version.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish