views:

73

answers:

2

I have a C# console application that runs nightly from a Scheduled Task to perform some maintenance. The application also displays a Form as a splash screen informing anyone on the system that the application is running, and shows the status.

To run the application with the correct permissions I need to run the Scheduled Task as another user. When I do this, however, the application runs but the splash screen is not visible to the logged in users.

I understand the issue but am not sure how to work around it. Is there a way to launch a Form for another user? Alternatively, is there a way to display a Form as a notification to all logged in users, similar to a 'Windows is shutting down' message?

Thanks for the ideas.

A: 

You could write another small application, and put it in the All Users startup folder. This app runs when the user logs on, then sits, invisibly (or in the tray area) and watches for specific triggers that indicate that your first app is about to run. When it sees them, it launches the splash screen.

GWLlosa
+1  A: 

Transform your application to a service that will run all the time in "kernel mode", independently from logged on users. Then create a small client app that will run in "user mode" all the time user is logged on (one instance per each user). Use interprocess communication to send a "signal" from server (service app) to each client (user app).

adf88
That's not kernel mode.
SLaks
Yes, it's not a kernel mode, but it is a "kernel mode" ;) You know what I mean...
adf88