469,283 Members | 2,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

Auto Start windows Application

Hi All
I have a windows application that needs to run
24/7 in the SysTray

How to Start this on Start up When ever the machine is re-started etc

I also need to run as a Different User that has
Rights to do FileSystem and other work on this
Server

Thanks
DaveL
Aug 29 '08 #1
3 5552
On Aug 29, 9:47 am, "DaveL" <dvs_...@sbcglobal.netwrote:
Hi All
I have a windows application that needs to run
24/7 in the SysTray

How to Start this on Start up When ever the machine is re-started etc

I also need to run as a Different User that has
Rights to do FileSystem and other work on this
Server

Thanks
DaveL

Dave,

One approach would be create two applications: a Windows service and a
WinForms application for the system tray. The Installer can setup the
Windows service to run under a privileged account not effected the the
current logged in user. The system tray application can provide the
user interface and communicate/interchange data with the Windows
service through .NET remoting or WCF depending on what version of .NET
you're using requirements call for on the target systems.

Reference:
[Building a system tray app in C#]
http://www.developer.com/net/csharp/article.php/3336751

[Creating a Windows Service in C#]
http://www.codeproject.com/KB/system...wsService.aspx

[From .NET Remoting to WCF]
http://msdn.microsoft.com/en-us/libr...57(VS.80).aspx
Aug 29 '08 #2
"DaveL" <dv*****@sbcglobal.netwrote in message
news:wV******************@nlpi065.nbdc.sbc.com...
I have a windows application that needs to run
24/7 in the SysTray

How to Start this on Start up When ever the machine is re-started etc

I also need to run as a Different User that has
Rights to do FileSystem and other work on this
Server
The SysTray only exists when a user is logged on to the computer, so this
is not the right place to run the application itself.

Instead, split the appliction in two:
- One part to do the actual work that needs to be performed 24x7. Build
ths application as a Windows Service. Configure the Installer to install
this service with the correct user settings, and to startup automatically.
If the user needs to be modified after the application is installed, an
Administrator can change it from Control Panel -Administrative Tools ->
Services.
- Another part to allow user interaction with the service. This can be
built as a Windows Application that uses NotifyIcon to display itself in the
System Tray. It can communicate with the service through any adequate
interprocess communication method, such as Remoting. Install this
application into the Start folder, so it will run as soon as a user logs in.

Aug 29 '08 #3
Thank you for your responses
DaveL

"DaveL" <dv*****@sbcglobal.netwrote in message
news:wV******************@nlpi065.nbdc.sbc.com...
Hi All
I have a windows application that needs to run
24/7 in the SysTray

How to Start this on Start up When ever the machine is re-started etc

I also need to run as a Different User that has
Rights to do FileSystem and other work on this
Server

Thanks
DaveL


Aug 29 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Dayne | last post: by
19 posts views Thread by Thom Little | last post: by
5 posts views Thread by Khurram Hanif | last post: by
3 posts views Thread by Brian Mitchell | last post: by
4 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.