views:

93

answers:

0

I'm trying to schedule a c# app to run in Windows 7's task scheduler.

It's set to run as an admin user.

Logged in as that user, the UI is visible.

Logged in as anyone else, the process appears in the task manager, but the UI is not visible.

Through some googling, I eventually stumbled across this caveat listed on wikipedia:

Running tasks do not show on the desktop unless the "run only when user is logged in" radio button is selected. The task is running in the background with no user interface

http://en.wikipedia.org/wiki/Task_Scheduler

When I enable "run only when user is logged in", the task runs only as the user I scheduled it to run under. So, this option doesn't actually work either.

In the end, what I'm trying to accomplish is this:

  • The app runs no matter what user is logged in, and show the UI
  • The app runs when no user is logged in. (The app does different things depending on whether or not a user is logged in.)

Any ideas? Thanks :)