Patching A Program

I have discovered a small (but nagging) bug in one of my programs, which I had distributed on CD to a few customers.

What I want to be able to do is supply them, on a floppy, the updated exe file.
The file is only small (under 50k).
Does anyone have any code (using only the intrinsic controls so it will run from floppy with dll's/ocx's that they already have on their system) that will find, then copy the updated exe file across to the installed path of my application.

I am using VB6.  
nu2vbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

stedan_98Commented:
all you need to do is basically write an updated EXE file and then you can write a small app to search for it (use the name of the EXE in the search parameters) and then replace it with the new version...
(if you cant do this i would be glad to help)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nu2vbAuthor Commented:
I'll take your offer of help up.
I've written the new exe (actually it was 180k, not so small really), but if you could show me the code (or the search parts at least) it would be great.

I'd need to search multiple drives/directories....

Thanks

Regards
Gordon
0
Éric MoreauSenior .Net ConsultantCommented:
0
mark2150Commented:
You don't have to fiddle with patchers and such. As long as you haven't added any new controls that require new .DLL's or .OCX's then you can simply replace the existing .EXE file with your new one. A batch file that copys the .EXE is all you would need.

At worst you'ld do a DIR c:\{yourexename}.exe /B > c:\somefile.txt

Then you read the somefile.txt file to get the location of your .exe and use that to shift from floppy to C:. Shouldn't require more than a dozen lines or so.

M
0
stedan_98Commented:
ok, i dont think a batch file would work.... you cant find files using batch files *and* it doesnt look very professional. When i talked about making a patcher, replacing the EXE is exactly what i was talking about. PS to use the somefile.txt (whatever) you would need to modify all the existing programs already unless your program already does that (writes a somefile.txt file) Anyway, email me at ptech_uk@yahoo.com
Stedan_98
PowerTech Software
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.