LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MD5

I may need to check the exe file everytime it runs up, in case it has been changed.

 

 

May I know how should I start to do it. Thanks.

0 Kudos
Message 1 of 9
(5,126 Views)

Did you try a search?

 

Review the material posted. If these do not meet your requirements, then post back indicating what your specific needs are.

Message Edited by smercurio_fc on 02-07-2010 11:20 AM
Message 2 of 9
(5,108 Views)

Look in vi.lib\Utility\MD5Checksum.llb

 

 

Message 3 of 9
(5,096 Views)

The library is great.

 

I tried to make it in 2 ways, but both seems not work.

 

1. For example, I have A.exe. Then I check the MD5 value of A.exe. And write another program B.exe to check it. Everytime B.exe will runup first to decide if to runup A.exe.

 

The problem is the A.exe and B.exe are seperate program. B.exe can be easily ignored.

 

2.  For example, I have A.exe. Then I check the MD5 value of A.exe. And I add some code in A.exe to check the MD5 value and hardcode it. But after I insert the code into A.exe or hardcode the correct value of MD5, the value of MD5 changed. What should I do.

 

Also, the time of checking a 20M file is a bit long, is there any setting to make it shorter.

 

Thanks.

0 Kudos
Message 4 of 9
(5,081 Views)

You will not be able to embed the MD5 checksum of your EXE inside your EXE. 

 

You can dynamically call a LabVIEW VI at runtime from A.EXE using VI Server. This dynamically called VI could contain the MD5 checksum value and perform the comparison to A.EXE, then return the results to A.EXE.

 

If your EXE is really large, then you could use .NET to perform the MD5 calculation, but your client computer with your compiled A.EXE will need to have .NET installed as well.

 

I've attached an updated version of an example .NET MD5 vi I wrote some years ago. (LV 8.6)

 

 

 

 

Message 5 of 9
(5,041 Views)

LabVIEW 2009 allows you to add a digital signature to your application, I have never explored this, but I assume this might deal with the issues you are concerned about.

 

And I doubt it it's easy to adjust a LabVIEW exe and still have the same functionality.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 6 of 9
(5,032 Views)

Hi Phillip Brooks,

 

I have not understand your words 100%. I can make a dynamic call of the code inside A.exe. If put outside, where to save it, in vi or exe format. If put inside, difficult to hardcode the checksum number.

 

 

Hi Ton,

 

May I know where I can find the reference of digital signature.

 

Thanks.

0 Kudos
Message 7 of 9
(5,004 Views)

I've attached an example project. You use VI server to dynamically call a VI that performs the MD5 checksum of your EXE.

 

The checksum VI resides in an LLB in the folder with the EXE, but is not compiled in as part of your EXE. The checksum VI returns a true if the MD5 digest of the EXE matches the value in your checksum VI.

 

 Attached project and files are in LV 8.6.1

 

Message 8 of 9
(4,986 Views)

Thanks for your example.

 

Finally, all the vi may be compiled into exe for customer usage.

 

If I cannot compile the checking part and real exe into one, then the checking part can be easily bypassed and they just run the real exe directly. That is what I am worried about.

0 Kudos
Message 9 of 9
(4,969 Views)