Bob,
Actually this is very much possible & actually quite easy in .NET. As Rinze
suggests normally one cannot "overwrite files that are in use", however .NET
has the ability to create a shadow copy of executables, such that you can
replace the original executable with the new one. To create a shadow copy of
an executable you set the shadow copy option when creating a new AppDomain,
then load your executable in this second app domain. This implies that your
app has a loader "stub" that creates the app domain & executes your actual
program. Using a FileSystemWatcher you could have the AppDomain
automatically restarted when a new version of the app is saved (However I
would simply inform my user to exit & restart the app).
http://msdn.microsoft.com/library/de...ClassTopic.asp
In .NET 2.0 (VS 2005) using ClickOnce is one of the easiest ways to
implement this app loader/updater.
Alternatively (.NET 1.x VS 2003) you can look at the Updater Application
Block:
http://msdn.microsoft.com/library/de.../updaterv2.asp
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"BobAchgill" <Bo********@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
|I am using FTP built in to my application to update the application and
data
| from a server...
|
| What is the normal method folks use to over write the application while
the
| program is active? What I am running into is that the FTP code will not
over
| write the .exe while the application is running.
|
| Do any other types of application extension files have the same issue with
| not wanting to be updated while the application is running: .dll, etc.??