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

manually writing a windows service

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


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

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.