Hii friends
Well I want to check if an exe file is corrupt without double clicking it....there mist be some way to do this.. can I write a code in vb ..??

Well, if you knew the original file size of the executable, you could write some code that tells you if the file is corrupt or not if the executable's file size doesn't match the file size specified in your coding. Or you can view this post and try to find some guidance here.

Well Its like this...When I am hex editing exe file.I delete one of the contents and try to run the file as a result an error box is displayed....but for this i hv to do manually.I was thinking if possible we could write "Process.start()" in try of try catch command. Now I dont want to actually run the command but if an error is introduced the catch command displays the output....!!! can we do some thing like this

You can download a command line tool from Microsoft named FCIV. The file is available at

http://support.microsoft.com/kb/841290

It can be used to calculate a checksum for a file (any type). Save the checksum and compare it to a new checksum to see if the file has been modified. For example

D:\temp\cksm>fciv ReadMe.txt
//
// File Checksum Integrity Verifier version 2.05.
//
79ac8d043dc8739f661c45cc33fc07ac readme.txt

D:\temp\cksm>notepad ReadMe.txt

(I modified the file by one byte)

D:\temp\cksm>fciv ReadMe.txt
//
// File Checksum Integrity Verifier version 2.05.
//
33f26408c666270a1f4714843f530ccf readme.txt

D:\temp\cksm>

The checksums (before and after) are different.

This article has been dead for over six months. Start a new discussion instead.