From: Eduardo on

> Yes, it works. I didn't know that.

After doing that for some reason the Comodo Antivirus/Firewall went
crazy using the 100% of the CPU. I had to reboot.
From: Rick Raisley on
Lots of valid suggestions here. The method I'd use, though, would be:

* Within your main program, have code that checks for updates. Manually or
timed, whatever. If an update is available, ask the user if they want to
download it.

* Now, I would never send out a single exe of the main program, I'd send out
a Setup that included the main program, as well as anything else required.
So that Setup program is what you're downloading.

* When download is complete, the main program knows that. It can ask the
user if they want to install now. If so, shell out to the Setup program, and
exit the running main program.

* If the Setup program is properly named and configured, just like a normal
setup program, it will require you to install as an Administrator, which is
what you want anyhow.

* Your Setup program can optionally start up the main program, after
installation.

The only problem with start-up programs that check for updates themselves is
that nothing else is going on when they're checking. While in your main
program, the user can be actually using the program, while checks for newer
versions are made in the background (with or without initial consent by the
user).

Oh, and I've tried a couple of the better programs to check for updates, and
for making incremental upgrade installs, and found them both to be a pain,
and not worth the trouble or cost. Just FYI. Your mileage will vary.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net

"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message
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: Rick Raisley on
"Nobody" <nobody(a)nobody.com> wrote in message
news:%23dMwcrzRKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>
> I already tried it on Windows 2000. I renamed a copy of MSPAINT.EXE while
> it's open, and it was successful. I then tried to delete the file, and
> Windows wouldn't let me. So the file is open somehow.
>

Interesting. I didn't know that either. Sure enough, I ran a VB program I'd
compiled, and of course, I cannot delete the EXE while it's running. And I
can't copy of the EXE while it's running, as that amounts to a Delete and
copy.

But I CAN Rename the exe that is running, the copy the newer version to the
exe's original name. All that's left is to deleted the renamed original
after the program ends.

I'll definitely have to consider that in my next updating procedure. ;-)

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net


From: Nobody on
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:e2qEnD1RKHA.220(a)TK2MSFTNGP02.phx.gbl...
> "Nobody" <nobody(a)nobody.com> wrote in message
> news:%23dMwcrzRKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>>
>> I already tried it on Windows 2000. I renamed a copy of MSPAINT.EXE while
>> it's open, and it was successful. I then tried to delete the file, and
>> Windows wouldn't let me. So the file is open somehow.
>
> Interesting. I didn't know that either. Sure enough, I ran a VB program
> I'd compiled, and of course, I cannot delete the EXE while it's running.
> And I can't copy of the EXE while it's running, as that amounts to a
> Delete and copy.

I assume that you meant "move" instead of "copy". Move implies deleting the
original, which can't be done while the file is in use.

> But I CAN Rename the exe that is running, the copy the newer version to
> the exe's original name. All that's left is to deleted the renamed
> original after the program ends.
>
> I'll definitely have to consider that in my next updating procedure. ;-)

Yes, that's how the article suggests doing it. Also, you don't have to keep
the .exe extension. You can rename it to "old.tmp", and this won't effect
the running program.



From: Rick Raisley on
"Nobody" <nobody(a)nobody.com> wrote in message
news:%23mAzZi2RKHA.1876(a)TK2MSFTNGP06.phx.gbl...
>>
>> Interesting. I didn't know that either. Sure enough, I ran a VB program
>> I'd compiled, and of course, I cannot delete the EXE while it's running.
>> And I can't copy of the EXE while it's running, as that amounts to a
>> Delete and copy.
>
> I assume that you meant "move" instead of "copy". Move implies deleting
> the original, which can't be done while the file is in use.
>

Actually, I meant "I can't copy OVER the EXE while it's running..." I run an
exe I made on a server, and am constantly (it seems) updating it on my local
PC. After recompiling, I'll copy the new one to the server, but of course,
if the one on the server is running, I can't copy it. I have to stop the
program first. But now I know I can actually rename the exe and then copy,
if I like.

>> But I CAN Rename the exe that is running, the copy the newer version to
>> the exe's original name. All that's left is to deleted the renamed
>> original after the program ends.
>>
>> I'll definitely have to consider that in my next updating procedure. ;-)
>
> Yes, that's how the article suggests doing it. Also, you don't have to
> keep the .exe extension. You can rename it to "old.tmp", and this won't
> effect the running program.
>

True enough. It's interesting when something you "know" turns out to be
wrong. I just assumed that since I couldn't delete a file that was running
at the time, and couldn't copy over it, that I certainly couldn't rename it
either.

If only I knew what else I know that isn't true. ;-)

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: Component Handles
Next: ItemData screwed up after sort ???