473,785 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET: Updating executable if it is in use..

Hi All..

I have written an application that clients of ours use at their
business. The application checks our main FTP server for new reports
and then downloads them. The download process also downloads NEW
versions of the executable they are running.

What I want to do is have the program that has just downloaded the
reports and executable to somehow be able to update itself. That is,
copy the new exe and overwrite the old one.

I was thinking maybe that on shutdown of the program, if there was a
new EXE available, a BAT file could be written to copy the new version
over. The BAT file would be run on closing of the application.

I know this isn't the best, but are there any other ideas? I don't
want to run an installer or such...

Thanks,
Robert
Nov 20 '05 #1
3 1304
Hi,

http://msdn.microsoft.com/library/de...tframework.asp

Ken
----------------------
"Robert Brown" <rb****@edium.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Hi All..

I have written an application that clients of ours use at their
business. The application checks our main FTP server for new reports
and then downloads them. The download process also downloads NEW
versions of the executable they are running.

What I want to do is have the program that has just downloaded the
reports and executable to somehow be able to update itself. That is,
copy the new exe and overwrite the old one.

I was thinking maybe that on shutdown of the program, if there was a
new EXE available, a BAT file could be written to copy the new version
over. The BAT file would be run on closing of the application.

I know this isn't the best, but are there any other ideas? I don't
want to run an installer or such...

Thanks,
Robert

Nov 20 '05 #2
There's no need to run an installer unless you have other actions to perform
(like adding registry entries).
For a sample of what you can do, go the MSDN site and search for the Updater
Application Block.

For something more complicated, you can create a host executable that
creates an appDomain, and loads your program into the AppDomain to run from
there. The host code can at any point unload the AppDomain, replace the
files, and restart the AppDomain. This is essencially what IIS does.

-Rob Teixeira [MVP]

"Robert Brown" <rb****@edium.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Hi All..

I have written an application that clients of ours use at their
business. The application checks our main FTP server for new reports
and then downloads them. The download process also downloads NEW
versions of the executable they are running.

What I want to do is have the program that has just downloaded the
reports and executable to somehow be able to update itself. That is,
copy the new exe and overwrite the old one.

I was thinking maybe that on shutdown of the program, if there was a
new EXE available, a BAT file could be written to copy the new version
over. The BAT file would be run on closing of the application.

I know this isn't the best, but are there any other ideas? I don't
want to run an installer or such...

Thanks,
Robert

Nov 20 '05 #3
Thanks for the replies..

I wasn't thinking about this way, but it might be the exact solution I am after.

Thanks,
Robert

rb****@edium.co m (Robert Brown) wrote in message news:<bd******* *************** ***@posting.goo gle.com>...
Hi All..

I have written an application that clients of ours use at their
business. The application checks our main FTP server for new reports
and then downloads them. The download process also downloads NEW
versions of the executable they are running.

What I want to do is have the program that has just downloaded the
reports and executable to somehow be able to update itself. That is,
copy the new exe and overwrite the old one.

I was thinking maybe that on shutdown of the program, if there was a
new EXE available, a BAT file could be written to copy the new version
over. The BAT file would be run on closing of the application.

I know this isn't the best, but are there any other ideas? I don't
want to run an installer or such...

Thanks,
Robert

Nov 20 '05 #4

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

Similar topics

2
6909
by: Derek Scollon | last post by:
Hope someone can point me in the right direction to fix this one... I'm currently running Apache 2.0.40 and PHP 4.2.2 on a RedHat9 server. I'm needing to update to PHP5 but don't want to change the way the rest of the server is configured. So far I've done the following... 1. Copied the following from phpinfo to get the current configuration... './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux'...
4
1373
by: Fred Hebert | last post by:
30 minutes ago my boss asked me to develop a proof of concept application, using .NET, that runs in a browser. The idea is that we want an easier way to deploy application updates. We are thinking of having users connect to our web server and execute a .NET app that would execute in the browser. We could then upgrade all of the users just by updating the web server. I don't expect anyone to do my work for me, but can you just point me...
3
3049
by: hussein | last post by:
'm not bale to run my projec on the 2000 server, he error was: error while trying to run project: unable to start debugging on the web server.erver side error occurred on sending debug HTTP request mak sure that the server is running correctly . verify that there are o syntax errors in the web.config... i check the IIS, it is running correctly, also the webconfig so what am i sposed to to do be able to run it
3
2765
by: al | last post by:
Hi, Can someone please tell me what is exactly zero deployment in VB.NET. Is it that .NET doesn't need to deal with the registry? If that is the case, then why MS introduced class registry? MTIA, Grawsha
14
2962
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will utilise the disco file to update the Corresponding proxy file and reflect the changes made to the web service. However, the results of doing this with out params is that the results seem
5
1508
by: nylyst | last post by:
I've run into a rather strange situation, and can't seem to find any details on why this would even be happening, so here goes: I've created an app to force users to update their pcAnywhere passwords. This is a VB.Net project compiled against .Net 1.1. This executable is placed on a terminal server in \Documents and Settings\All Users\Desktop and up until recently worked just fine, with about 10 people utilizing it on a recurring basis....
0
3669
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. · When was the first version of .NET released? The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on...
1
1169
by: PLS | last post by:
In the native world, there are a number of utilities that allow one to edit resources in an executable. I have a situation where I want an executable to contain a semi-static table. I want to be able to give selected people in the field instructions for changing this table. They will then distribute the program with the updated table within their groups. The people updating the table will not have Visual Studio. And if at all possible...
60
3888
by: jim | last post by:
I am looking for an application that will wrap my .Net application (and any needed .Net parts) into a single exe. I know of Thinstall ($4,000 for application and per copy fees for your exes) and of Xenocode (~$1,500 plus ~ $12 per copy of your exe). But, I'd like something that is actually affordable for a hobbyist programmer. This capability (Thinstall's being able to wrap a .Net app and ship it as a single exe) would be a FANTASTIC...
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.