The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

How do I update a windows service? Options
uTILLIty
#1 Posted : Thursday, October 02, 2008 3:46:10 AM
Rank: Newbie
Groups: Member

Joined: 10/2/2008
Posts: 1

Hi!

 

I was wondering how I can make a windows-service update itself.

 

If I am using the AppLife Updater-Service, will it act as a wrapper for stopping and restarting my component?

 

How does AppLife close and reopen a winforms-application if the component which does it is inside that application?

 

best regards,

 

Tilli

brianh
#2 Posted : Thursday, October 02, 2008 5:38:10 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 283
Location: Minnesota

Hello Tilli,

 

You use the Stop Service and Start Service actions within your update.  To update a service, you can stop the service, replace its assemblies and restart the service.

 

The AppLife Updater-Service will execute your update actions in a context that will have permissions to start and stop your service.  All our service does is provide a privileged process to execute your update actions.  Your application must be registered with the service upon installation of course, which requires admin privileges.  Alternatively, you could require your users to have these security privileges in order to execute your update. The AppLife Update Service is optional.

 

You are right that the AppLife Update component lives within your application.  When you initiate an update process on the AppLife Update component, an inter-process message is sent to any other instantiated AppLife Update Components with your specific application id.  This message initiates a shutdown of the hosting application. (You can intervene in this shutdown within your application code by using the ShutdownRequested event).  This is how the application, and all of its instances) are closed.  Before the initiating component closes, it extracts and launches an executable that starts the actual update process (Kjs.AppLife.Update.Launcher).  Its the launcher that will re-open the hosting application after the update process completes.  This re-start happens by defualt, but can be controlled as well by passing a parameter to the method that initiates the update process.

Brian Haas
Kinetic Jump Software
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.