Link to home
Start Free TrialLog in
Avatar of nu2vb
nu2vb

asked on

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.  
ASKER CERTIFIED SOLUTION
Avatar of stedan_98
stedan_98

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nu2vb
nu2vb

ASKER

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
Avatar of Éric Moreau
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
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