Link to home
Start Free TrialLog in
Avatar of mmanning
mmanning

asked on

Batch file programming - updating files.

I'm trying to produce a bootable disk which will detect the version of windows, either 3.11 or 3.1 and overwrite the winfile.exe with the MS year 2000 compliant one.  However how can I tell the version from within a batch file?  What commands can I use to determine which copy to copy across.  It needs to be done automatically because it needs sending around the country to my companies branches.  The users cannot be trusted to do it on their own.
Avatar of rwilson032697
rwilson032697

Include on the disk a small 16 or 32 bit checksum program. Have the batch file or program on the bootable disk run the checksum program over the winfile.exe program and check the result against the known checksums for the 3.1 and 3.11 versions. Based on that copy the correct one over...

Cheers,

Raymond.
Avatar of mmanning

ASKER

R.Wilson could you please give me some more informatin on how to do this.
Additional information needed on how to do it!  Thanks
ASKER CERTIFIED SOLUTION
Avatar of cbo120897
cbo120897

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
cho is on the right track, but his method won't distinguish between versions (I think).

Cheers,

Raymond.
Hi rwilson,
I think different versions have different byte structure (and file size).
Raymond I produced a bootable disk which works carries out the task well.  

Thankyou
MManning