Vb.net Windows Service with Automatic Updates

G

Guest

I have read approximately 30 articles now on various methods to make your
vb.net application automatically update itself and I can't see how they apply
to a vb.net windows services projects. The goal of the project is to write a
windows service in vb.net that runs on many workstations that can
automatically update itself from a central web server or share (either or
doesn’t matter). I do not want the service to re-install itself each time
there is an update. I wanted to use the model used to run forms remotely but
cannot seem to find any examples of loading remote classes for use in
services. If anyone has any ideas or could point me to any articles on the
subject I would be most appreciative.


TIA,
Blax…
 
G

Guest

When people talk about automatically updating applications, they are usually
referring to automatically downloading new applications bits, to the local
machine (the machine where the service is running), shutting down the current
app, and starting the new one. It doesn't sound like this is what you're
looking for, but if it is, the Application Updater Application Block will do
this for you.

If you really want your Windows Service to run functionality in a class
that's not on the local machine, you should look into Web services. This
would let you put functionality on a central server, and call it from your
local Windows service.

Scott Swigart
www.swigartconsulting.com
 
G

Guest

I think normally a web service would be the way to go, but in this case I
don't know if or how that can help me. What I really need to be able to do is
change out the core code at will. Functions, subs and events that would
normally be housed in a class in a DLL included with the app. This DLL must
be able to interact with the local machine for example process.start
something on the local workstation. I can't see how to do that from a web
service without a significant ammount of logic being in the service itself
which is what I want to avoid.

Basically I want a "dummy" windows service running on a workstation that
will run subs in a class that is on a remote machine. A blank canvas, as it
were. Does that make sense?

TIA,
Blax...
 
G

Guest

Not to split hairs, but you don't actually want a "windows service running on
a workstation that will run subs in a class that is on a remote machine".
You want a windows service that downloads an assembly with subs, but you need
those subs to run on the local machine (you mentioned process.start, for
example).

In this case, check out the Application Updater Application Block. It does
exactly what you're looking for. There's a dummy AppStart process that runs
the latest version of your code. When a new version is available, it's
downloaded from the server, the current version stops, and the new version
starts. AppStart always runs the latest version, so this would be the
service you would register.

What you're looking to do isn't trivial, esp with a service, but the App
Updater is the best bet.
 
G

Guest

Actually that is exactly what I want, I want the service to dynamically load
a class (dll) and run subs contained within. The assembly.formload looks
about as close to what I want to do, however, the only documentation I have
found is all based around using windows forms which of course you do not have
in a service.

The application updater block does exactly what I do not want to do.


Blax...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top