|
From: Leif M. <lei...@ta...> - 2012-08-02 09:20:54
|
Lars, Windows unfortunately does not allow this directly as all open files are locked. As long as the Wrapper.exe is running you will not be able to update it. This will be a problem with all of the jar and DLL files as well. The solution is to actually stop the Wrapper and run another process to do the update. Then once the wrapper and your application have been updated, you will want to restart the service. If you are running on the desktop, this will be fairly easy. But if running as a service, you will need a way to do this in the background using a process that has all of the required permissions to 1) replace the files, and 2) to stop and start the service. The later will need to be an elevated account. We will discuss options here as well. Cheers, Leif On Thu, Aug 2, 2012 at 5:02 PM, Lars Schnoor <Lar...@if...> wrote: > Hi > > I have made a service that uses the service wrapper. I need to update > the service from time to time and for this I implemented a file transfer > method. This works fine, I copy the files over the network to the > destination and restart the computer. The only problem is that the > wrapper.exe and wrapper.dll are in use and can not be overwritten. So > updating my service does not include wrapper.exe and wrapper.dll. I > would like to update all files including the two, is there a way to do > this? Can I shutdown wrapper.exe and have my service continue to run? > Thanks in advance! > > Lars > > |