473,386 Members | 1,779 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,386 software developers and data experts.

manually writing a windows service

I'd like to write a windows service. Unfortunately, my company would only spring for the standard edition of VB.NET which doesn't support the creation of windows services. Is it possible to write one manually? If not, are there any other (cheaper) tools available? Any free ones?
Jul 21 '05 #1
3 1847
its really easy to write a basic service just using the SDK which is free.
The quickstart tutorial has examples of code for it.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Glenn Venzke" <Gl*********@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
I'd like to write a windows service. Unfortunately, my company would only

spring for the standard edition of VB.NET which doesn't support the creation
of windows services. Is it possible to write one manually? If not, are there
any other (cheaper) tools available? Any free ones?
Jul 21 '05 #2
Glen,

In addtition from John,

The link for the SDK net 1.1

http://www.microsoft.com/downloads/d...displaylang=en

In it is as well a free VBC compiler with commandline parameters,

I hope this helps a little bit?

Cor
Jul 21 '05 #3
Glenn Venzke wrote:
I'd like to write a windows service. Unfortunately, my company would
only spring for the standard edition of VB.NET which doesn't support
the creation of windows services. Is it possible to write one
manually? If not, are there any other (cheaper) tools available? Any
free ones?


Do you really need a service? You need a service for one or more of these
reasons:

1) it must run when no one is logged on
2) it must run all the time (that is, if it faults, it must be restarted)
3) it has special security requirements that you don't expect the
interactive user to have

Don't use services to play tricks: if you want to communicate with the
interactive user you should write two processes - the service and another
one that runs under the interactive user account and talks to the service
via an interprocess communication mechanism. Clicking on the 'allow service
to interact with the desktop' is asking for trouble.

Also if #3 is your intention, be careful. If you run under the LOCALSYSTEM
account you get complete access to the OS (this account has TCB privileges -
Trusted Computing Base, that is, it *is* the operating system), so you can
really screw up the system because LOCALSYSTEM can do more or less
*anything*. Plus LOCALSYSTEM by default does not have network privileges.

Note that services *must* be installed on the machine (ie in the registry),
and hence they don't follow the .NET ideal of 'XCOPY deployment'. Services
also have some important threading and initialization issues. If you don't
know what these are then its probably better not to write a service.

Whenever I find someone writing a service I invariably find that they don't
need any of these three criteria and since a service is, in effect,
extending the operating system, I usually tell them that they don't need a
service!

Richard
--
my email ev******@zicf.bet is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/
Jul 21 '05 #4

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

Similar topics

2
by: Glenn Venzke | last post by:
I'd like to write a windows service. Unfortunately, my company would only spring for the standard edition of VB.NET which doesn't support the creation of windows services. Is it possible to write one...
3
by: Chris Dunaway | last post by:
I am writing a Windows Service that reads and processes files on a set schedule. I want to create a second app that can monitor the Windows service. The Windows service will write trace messages...
3
by: Glenn Venzke | last post by:
I'd like to write a windows service. Unfortunately, my company would only spring for the standard edition of VB.NET which doesn't support the creation of windows services. Is it possible to write one...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
8
by: Amil Hanish | last post by:
There is a site that has multiple FORM elements. How do I programatically POST to a specific form? The individual FORM elements have a <input name=xxx type=image return truethat is used to submit...
2
by: Solomon_Man | last post by:
All, I have a Windows Service application that has database connectivity and needs the capability to let a user know that there has been a db failure. What is the proper way to notify a user that...
3
by: Levi Campbell | last post by:
Hi, I'm trying to write a program for a friend of mine who uses windows but I use GNU/Linux. I know you can use mingw and link to the python dll, but is there a way to create a win32 service under...
3
by: =?Utf-8?B?Q29yeSBKLiBMYWlkbGF3LCBCZXlvbmQwMS5jb20= | last post by:
Hi. I need to write a new windows service that will run on windows server, probably 2003. Does anyone know of a good place on MSDN (or elsewhere) to get basic examples of how to do this? I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.