By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

Auto Start windows Application

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
"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

P: n/a
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.