473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How can i create a windows service for my application?

Hi, how can i create a windows service and then how can i
install it. Thanx.
Nov 15 '05 #1
3 6981
Hi,

If you are using VisualStudio.NET, then the GUI itself
provides much of the help for creating a Windows Service.
Well, you could do the following.
1. Click Files-New-Project
2. Now from the available project options on the right
hand side, choose "Windows Service"
3. Choose the default options, and click OK
4. Now add your code within OnStart method...

To install ur new service, within your Windows Service
project, add a new "Setup and Deployment Projects". Follow
the instructions from .NET help....

If you want to have a Windows Service without using any
Wizards or GUI, you could follow the sample within the
MSDN or .NET help documentation.

hth.
irfan
Nov 15 '05 #2
Careful when designing UI's to NT services, its a way to get privlidge
escallation.

If something runs as SYSTEM and then you have a UI popup that runs as that
USER, then you can inject messages into that window event queue, subclass
winproc's etc and get SYSTEM prilvlidges, always always be aware of that
when coding UIs to services etc.

--

Duncan McNutt
Microsoft Product Deactivation Team
--
"Irfan" <sy********@geind.ge.com> wrote in message
news:0a****************************@phx.gbl...
Hi,

If you are using VisualStudio.NET, then the GUI itself
provides much of the help for creating a Windows Service.
Well, you could do the following.
1. Click Files-New-Project
2. Now from the available project options on the right
hand side, choose "Windows Service"
3. Choose the default options, and click OK
4. Now add your code within OnStart method...

To install ur new service, within your Windows Service
project, add a new "Setup and Deployment Projects". Follow
the instructions from .NET help....

If you want to have a Windows Service without using any
Wizards or GUI, you could follow the sample within the
MSDN or .NET help documentation.

hth.
irfan

Nov 15 '05 #3
ok, got it. Thanks for your help a lot.
-----Original Message-----
Careful when designing UI's to NT services, its a way to get privlidgeescallation.

If something runs as SYSTEM and then you have a UI popup that runs as thatUSER, then you can inject messages into that window event queue, subclasswinproc's etc and get SYSTEM prilvlidges, always always be aware of thatwhen coding UIs to services etc.

--

Duncan McNutt
Microsoft Product Deactivation Team
--
"Irfan" <sy********@geind.ge.com> wrote in message
news:0a****************************@phx.gbl...
Hi,

If you are using VisualStudio.NET, then the GUI itself
provides much of the help for creating a Windows Service. Well, you could do the following.
1. Click Files-New-Project
2. Now from the available project options on the right
hand side, choose "Windows Service"
3. Choose the default options, and click OK
4. Now add your code within OnStart method...

To install ur new service, within your Windows Service
project, add a new "Setup and Deployment Projects". Follow the instructions from .NET help....

If you want to have a Windows Service without using any
Wizards or GUI, you could follow the sample within the
MSDN or .NET help documentation.

hth.
irfan

.

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire...
2
by: PJ Olson | last post by:
In C++ we had the ability to create a property page that could be merged into an existing property sheet to provide customization inputs for users. Can anyone point me to an example of how to do...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
6
by: Tomas Machala | last post by:
Hi, how can I create non-visual application in Visual Studio 2003? Theoretically I could just make windows form invisible but it's not much elegant. I've also tried to use console application but...
1
by: James Proctor | last post by:
Hi there, im brand new to ASP. Ive done loads of VB coding and one of my clients is intrested in a web based application, so im trying to play on and learn it a tad. However im comming across lots...
6
by: Neo | last post by:
i'd like to create an application which would run in the background, & there'd be an icon in the system tray (can use the notify icon). But HOW can i make the form invisible. What i'd like to do...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
3
by: gerard.mears | last post by:
Hi, I'm a total newbie at VB.NET so please bare with me. I would like to create a simple service that will log all exe and com files that are executed but I don't know where to start. I'm...
1
by: drk.kumar | last post by:
I have an implementation issue with WMI scripts to check the user machine processor. The implementation is working fine in the local machine (Windows XP operating system). It is throwing script...
6
by: jojoba | last post by:
Hi, I am trying to create a .net webservice such that: When a user calls the service, the server creates a System.Windows.Forms.Form and shows it on the server screen. I know this sounds...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.