Home All Groups Group Topic Archive Search About

How to convert a regular VB app into a service to run on a Windows 2003 server?

Author
13 Apr 2006 9:49 PM
Bill Nguyen
I have a small VB app that I would like to install as a service in 1 of our
Win 03 servers.
Any suggestion is geatly appreciated.

Bill

Author
13 Apr 2006 11:20 PM
Tom Shelton
Bill Nguyen wrote:
> I have a small VB app that I would like to install as a service in 1 of our
> Win 03 servers.
> Any suggestion is geatly appreciated.
>
> Bill

A little to general Bill...  What kind of application is it?  Is it a
windows forms application?  Is it a console application?  I am assuming
it is in VB.NET...

The main thing is that services really shouldn't have a GUI.  If you
really want to do this, I would separate out the important logic into 1
or more class libraries and then reference them from your vb app and
your windows service project.

--
Tom Shelton [MVP]
Author
14 Apr 2006 12:05 AM
Bill Nguyen
It's a win form app with a single form.
..
I can move the routines out of the GUI to a module.

Please tell me the next steps to take.

Thanks a million

Bill


Show quoteHide quote
"Tom Shelton" <t**@mtogden.com> wrote in message
news:1144970405.091928.146740@j33g2000cwa.googlegroups.com...
>
> Bill Nguyen wrote:
>> I have a small VB app that I would like to install as a service in 1 of
>> our
>> Win 03 servers.
>> Any suggestion is geatly appreciated.
>>
>> Bill
>
> A little to general Bill...  What kind of application is it?  Is it a
> windows forms application?  Is it a console application?  I am assuming
> it is in VB.NET...
>
> The main thing is that services really shouldn't have a GUI.  If you
> really want to do this, I would separate out the important logic into 1
> or more class libraries and then reference them from your vb app and
> your windows service project.
>
> --
> Tom Shelton [MVP]
>
Author
14 Apr 2006 3:07 AM
Tom Shelton
Bill Nguyen wrote:
Show quoteHide quote
> It's a win form app with a single form.
> .
> I can move the routines out of the GUI to a module.
>
> Please tell me the next steps to take.
>
> Thanks a million
>
> Bill
>
>
> "Tom Shelton" <t**@mtogden.com> wrote in message
> news:1144970405.091928.146740@j33g2000cwa.googlegroups.com...
> >
> > Bill Nguyen wrote:
> >> I have a small VB app that I would like to install as a service in 1 of
> >> our
> >> Win 03 servers.
> >> Any suggestion is geatly appreciated.
> >>
> >> Bill
> >
> > A little to general Bill...  What kind of application is it?  Is it a
> > windows forms application?  Is it a console application?  I am assuming
> > it is in VB.NET...
> >
> > The main thing is that services really shouldn't have a GUI.  If you
> > really want to do this, I would separate out the important logic into 1
> > or more class libraries and then reference them from your vb app and
> > your windows service project.
> >
> > --
> > Tom Shelton [MVP]
> >

I would move it out to a class library, and then create a windows
service project and reference the library (you would reference it from
your windows form project as well).  There are examples in the
documentation, but the basics are that you need to create a class that
inherits from System.SericeProcess.ServiceBase.

--
Tom Shelton [MVP]
Author
14 Apr 2006 2:19 PM
Bill nguyen
Thank very much, Tom.

Now I know where to start.

Bill

Show quoteHide quote
"Tom Shelton" <t**@mtogden.com> wrote in message
news:1144984057.960645.189310@t31g2000cwb.googlegroups.com...
>
> Bill Nguyen wrote:
>> It's a win form app with a single form.
>> .
>> I can move the routines out of the GUI to a module.
>>
>> Please tell me the next steps to take.
>>
>> Thanks a million
>>
>> Bill
>>
>>
>> "Tom Shelton" <t**@mtogden.com> wrote in message
>> news:1144970405.091928.146740@j33g2000cwa.googlegroups.com...
>> >
>> > Bill Nguyen wrote:
>> >> I have a small VB app that I would like to install as a service in 1
>> >> of
>> >> our
>> >> Win 03 servers.
>> >> Any suggestion is geatly appreciated.
>> >>
>> >> Bill
>> >
>> > A little to general Bill...  What kind of application is it?  Is it a
>> > windows forms application?  Is it a console application?  I am assuming
>> > it is in VB.NET...
>> >
>> > The main thing is that services really shouldn't have a GUI.  If you
>> > really want to do this, I would separate out the important logic into 1
>> > or more class libraries and then reference them from your vb app and
>> > your windows service project.
>> >
>> > --
>> > Tom Shelton [MVP]
>> >
>
> I would move it out to a class library, and then create a windows
> service project and reference the library (you would reference it from
> your windows form project as well).  There are examples in the
> documentation, but the basics are that you need to create a class that
> inherits from System.SericeProcess.ServiceBase.
>
> --
> Tom Shelton [MVP]
>
Author
14 Apr 2006 2:27 PM
Mike Lowery
I wrote a service using VB.Net called SpamGrinderProxy.  It's open source and
can be downloaded from Sourceforge:
http://spamgrinderprox.sourceforge.net/

If you're willing to peruse the code, it should give you an idea of how to write
a service.

Show quoteHide quote
"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message
news:e3941c1XGHA.4652@TK2MSFTNGP04.phx.gbl...
> It's a win form app with a single form.
> .
> I can move the routines out of the GUI to a module.
>
> Please tell me the next steps to take.
>
> Thanks a million
>
> Bill
>
>
> "Tom Shelton" <t**@mtogden.com> wrote in message
> news:1144970405.091928.146740@j33g2000cwa.googlegroups.com...
>>
>> Bill Nguyen wrote:
>>> I have a small VB app that I would like to install as a service in 1 of our
>>> Win 03 servers.
>>> Any suggestion is geatly appreciated.
>>>
>>> Bill
>>
>> A little to general Bill...  What kind of application is it?  Is it a
>> windows forms application?  Is it a console application?  I am assuming
>> it is in VB.NET...
>>
>> The main thing is that services really shouldn't have a GUI.  If you
>> really want to do this, I would separate out the important logic into 1
>> or more class libraries and then reference them from your vb app and
>> your windows service project.
>>
>> --
>> Tom Shelton [MVP]
>>
>
>