• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 126
  • Last Modified:

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.  
0
nu2vb
Asked:
nu2vb
1 Solution
 
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
 
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

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now