Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / September 2006

Tip: Looking for answers? Try searching our database.

My own autoupdater - problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martijn Cox - 27 Sep 2006 16:27 GMT
Hello,

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.

Is there a simple solution for this problem?

Thanks in advance,

Martijn Cox
Carmine Moleti - 28 Sep 2006 09:10 GMT
> 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.
[quoted text clipped - 12 lines]
> 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
Martijn Cox - 29 Sep 2006 09:57 GMT
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.

>> I have created an autoupdater webservice for my PPC2003 application, and
>> have managed to retrieve the download.cab from my web service on my
[quoted text clipped - 29 lines]
> HTH,
> Carmine

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.