From: Eduardo on

> And the moral is.. don't use mspaint :)

From: Michel Posseth [MCP] on
jus to confirm

It does work for sure on Windows > = 2000 with executables and dll`s the
problems Eduardo encountered are probabaly a nasty bug in the antivir or a
damaged OS as on my test systems and on the systems of my users where i
use this technique since 2001 i have never encounterd anny problems in
relation to using this technique .



"Michel Posseth [MCP]" <msdn(a)> schreef in bericht
> You can do another nice trick ,
> download the new executable , rename your current running executable
> ( give it bck or .prev extension for instance ) , copy your new
> executable to the location of the running executable
> show the user a message that he should restart the executable ( or kill
> the current app , and start the new exe ) the new exectable could on
> startup delete the previous files left over
> Michel Posseth
> "Tony Toews [MVP]" <ttoews(a)> schreef in bericht
> news:41inc55tl5eqk4j4d0s1bgm1u0kp79t2v8(a)
>> Folks
>> I'm going to be adding the ability to check for updates to my VB6
>> utility. Now you can't replace an exe while it's actually being used.
>> Correct? I have had this happen to me a few times when I've been
>> testing the exe in a Virtual PC session, have switched over to the VB
>> IDE, fixed the bug, made a new exe and then haven't been able to
>> replace the exe because it was in use.
>> To me the most elegant way is to create a very small VB6 exe whose
>> only job is to be called by the main VB 6 exe and to copy in the new
>> exe and start up the main app again.
>> Now I could muck about with creating a one line .cmd file with a copy
>> line in it. But that, to me, just isn't all the elegant and is rather
>> a brute force approach. Not that I mind brute force approach but the
>> momentary flashing of the command prompt screen I find is rather
>> disconcerting when I see some apps using it.
>> Any suggestions? Or is a little stubbie program the best option?
>> Tony
>> --
>> Tony Toews, Microsoft Access MVP
>> Tony's Main MS Access pages -
>> Tony's Microsoft Access Blog -
>> Granite Fleet Manager

From: Nobody on
"Michel Posseth [MCP]" <msdn(a)> wrote in message
> jus to confirm
> It does work for sure on Windows > = 2000 with executables and dll`s

I just tried it on NT4+SP4 Workstation, and I can rename the file while it's
in use, but not delete it.

In Windows 98, I can't rename or delete EXE files while in use. In both
cases I used a copy of MSPAINT.EXE for testing.