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 .

HTH

Michel


"Michel Posseth [MCP]" <msdn(a)posseth.com> schreef in bericht
news:9E3DFD35-847C-40BB-B01F-A4B1C048F6D0(a)microsoft.com...
> 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
>
> HTH
>
> Michel Posseth
>
>
>
>
>
> "Tony Toews [MVP]" <ttoews(a)telusplanet.net> schreef in bericht
> news:41inc55tl5eqk4j4d0s1bgm1u0kp79t2v8(a)4ax.com...
>>
>> 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 - http://www.granite.ab.ca/accsmstr.htm
>> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
>> Granite Fleet Manager http://www.granitefleet.com/
>

From: Nobody on
"Michel Posseth [MCP]" <msdn(a)posseth.com> wrote in message
news:31147686-C37C-4059-9503-4C0A92AB1DB9(a)microsoft.com...
> 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.