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

Vb.net Windows Service with Automatic Updates

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

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


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

"Blaxer" wrote:
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…

Nov 21 '05 #2

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

"Scott Swigart" wrote:
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

"Blaxer" wrote:
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…

Nov 21 '05 #3

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

"Blaxer" wrote:
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...

"Scott Swigart" wrote:
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

"Blaxer" wrote:
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…

Nov 21 '05 #4

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

"Scott Swigart" wrote:
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.

"Blaxer" wrote:
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...

"Scott Swigart" wrote:
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

"Blaxer" wrote:

> 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…
>

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.