473,414 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

over write running .exe

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.??
Feb 3 '06 #1
3 1913
BobAchgill wrote:
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.??


Impossible, you can't overwrite files that are in use (be it
executables, dll or whatever). Maybe you could write a sort of
monitoring program that will detect a new upload (to a specified
directory), shut down the program, copy/move the new program and start
the new version.
--
Rinze van Huizen
C-Services Holland b.v
Feb 6 '06 #2
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.??
Feb 6 '06 #3
Jay B. Harlow [MVP - Outlook] wrote:
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


Wow.. you learn something new every day :) I was quite unaware of this.
--
Rinze van Huizen
C-Services Holland b.v
Feb 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
5
by: Shalen chhabra | last post by:
Hey, Can anyone give me a snippet for running a python program over all the files in the directory. For ex: I have ten files in a directory and I want to run a python program against all of...
4
by: Kenny | last post by:
I have been trying to write a script that will increase the size of and image when you mouse over it, and decrease it to original size, when you mouse out. After a couple of attempts, this is what...
1
by: Neel Word | last post by:
I need to develop an application (development platform: Win2000; target platform: Win98/ME/NT4/2000/XP), which would require file transfer functionality over dial-up and network. We could...
3
by: James Stroud | last post by:
Hello All, I am helping someone write a python script to run their DOS application through an SSH terminal. It seems that this program wants to access a DOS shell and send output there. If...
19
by: Mark 123 | last post by:
I just read at http://groups.google.com/group/microsoft.public.access.forms/browse_frm/thread/766ba7b493eacb63/8a7d5504ee848c21?lnk=st&q=migrate+access+97+to+access+2007&rnum=1#8a7d5504ee848c21...
3
by: Sebastian | last post by:
Hello all I have a report where I have two nested groups. I know there are only three standard options for running sum: None, Over Group and Over All. I have a MyTextBox in detail section where...
13
by: Godzilla | last post by:
Hello, How do you create/spawn new processes in XP over telnet using python? I.e. I would like to create a new process and have it running in the background... when I terminate the telnet...
6
by: Beemer Biker | last post by:
I have a C# project VS2005, that uses GridView and Multiview. It is getting bigger then I originally anticipated and running slow and needs to be broken up into several pages (yes, I am a newbie...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.