Re: My own autoupdater - problem
- From: "Martijn Cox" <m.cox@xxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Sep 2006 10:57:38 +0200
Thanks for the advice, it helped me discoverer that the trouble was very
likely not located in the area I thought it was.
The reason why the app wouldn't release its lock on its main executable, is
because the downloading process opened a few threads that I didn't know
about, and where kept alive without my knowledge. I figure the application
never exited, because it could not end the threads.
"Carmine Moleti" <carmineaskme@xxxxxxxxx> schreef in bericht
news:efg01s$ghq$1@xxxxxxxxxxxxxxxxxxxxxxx
I have created an autoupdater webservice for my PPC2003 application, and
have managed to retrieve the download.cab from my web service on my
device. Next, however, while trying to install the new version, I run
into the fundamental problem of not being able to run the installer cab,
since the old version of the application (which has spawned the
autoupdate request) is still running. When wceload then tries to install
the cab, it rightfully complains of a lock on the application executable,
not being able to overwrite the currently runnning version.
Of course the simplest workaround would be to let the user run the
update.cab file after closing the application, but there is no guarantee
my user base will be tech-savy enough to perform the necessary actions
(that is, a) open an explorer and b) let wceload.exe execute the cab-file
by clicking on it). I can think of some other options (create a process
which kills the current user application), but they don't seem elegant,
requiring much works for something that is or seems to be so simple.
Hi,
I'm still newbie on .Net but, from what I know, I think you should split
the autoupdate and the core app in two different appdomains.
I mean, having the main appdomain which checks for updates, download them
and install them.
More, this main appdomain takes care of launching the real application in
a separate appdomain.
This way should allow you to unload the real app and do the update.
Of course, it could happen that you'll need to also update the main
application (the one that implements the autoupdate feature). But I guess
it'll happens less frequently.
HTH,
Carmine
.
- Prev by Date: MSI problem
- Next by Date: CreateWatchDogTimer in CF
- Previous by thread: MSI problem
- Next by thread: CreateWatchDogTimer in CF
- Index(es):
Relevant Pages
|