Re: replacing a running program

Thank you very much.
I see that what I discover should really work.
In fact, when I deleted the program, Windows tried to move it to the Recycle Bin and then allowed to do some things. If I tried to delete it with shift+Del, it didn't allow.


Octavian

----- Original Message ----- From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, February 23, 2008 10:57 PM
Subject: RE: replacing a running program




I got a better link to the BITS API article I was wanting you to look at so
you don't have to hunt it down.

http://msdn.microsoft.com/msdnmag/issues/03/02/BITS/default.aspx

Ken

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Octavian Rasnita
Sent: Saturday, February 23, 2008 11:32 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: replacing a running program

Thank you but I am not using .net.

I've created a program in perl with wxWidgets (WxPerl) and for the moment I
have only the version for Windows, but I hope I will be able to create a
Linux version also, because perl, WxPerl and wxWidgets are all portable.

I have noticed an interesting thing though.
I've seen that if I start the program, then I delete it, the OS doesn't give
any error for a few seconds.
After some more seconds, it gives the error telling that the file is in use
and that it can't be deleted.
If I delete the program while it is running, but immediately I close the
program, the file is deleted successfully, and it doesn't give any error.

I don't know if it works for the moment, but I guess MS made something to
allow us to delete the program, do something very fast then close it, and I
hope I will be able to do what I want.

I have a very fast computer, so I think that error message is not delayed
because of the speed of the machine.
I've tried this with other programs like notepad.exe and it works the same.

I don't know how it will work this under Win 2k or older versions...

Octavian

----- Original Message -----
From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, February 23, 2008 7:12 PM
Subject: RE: replacing a running program




You didn't say if you were using .net or not but here is a link that I
found
useful for this

http://msdn2.microsoft.com/en-us/netframework/aa497367.aspx

Ken

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Octavian
Rasnita
Sent: Saturday, February 23, 2008 6:45 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: replacing a running program

Hi,

I've made a program for Windows and I want to add a function that
downloads
a newer version of this program if available, but I want it to replace the
current version with the newer one.
I know that under Windows if the program is running, I cannot delete it in
order to replace with the newer version.

I want it to act something like the extraordinary program UTorrent even
though my program is not made using the same language.

Do you have any idea how to do that, without creating a second program
that
does the download and replacement?

Thank you.

Octavian

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind

Other related posts: