From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I obtain the date of the exe and display it on the fropnt panel?

Hello,

 

 

    Is there a way that a Labview program can display the date of the exe and display it on the front panel? I am aware of the version info on the application builder, but I did not see a way to get the date when the exe was created.

Regards,


Kaspar
0 Kudos
Message 1 of 8
(2,889 Views)

Hi

 

You could use File/Directory Info function in your code like this

 

 

cheers

 

David

Message Edited by David Crawford on 02-24-2010 11:11 PM
Message Edited by David Crawford on 02-24-2010 11:12 PM
Message 2 of 8
(2,874 Views)

Hello,

 

   Thanks for getting back to me. The lab that I work in uses exe files for the test programs. So the code above will give me the information for the main vi of the program, which is not the exe file. If I have to update a sub-vi because of a feature in the code, I will have to create a new exe with the application builder to incorporate the change but the main calling vi will remain unchanged. Maybe I am missing something here, but it looks like the code above will not work for me.

   Thanks again for getting back to me.

 

 

Regards,


Kaspar
0 Kudos
Message 3 of 8
(2,852 Views)

Hi,

 

No, it is the date of the exe file.

 

Lets say I called it Main.vi. I then built this into Main.exe. So I run the exe and Current VI path returns c:\Main.exe\Main.vi. App.Kind tells me that this is an executable so so I strip the path to leave c:\Main.exe. I feed this path to File Directory Info as above.

 

Why dont you give it a try to see how it works? Build an exe, run it, look at the timestamp. Rebuild the exe run it and check the timestamp again. It will be different. I did not change Main.vi between builds.

 

I may be misunderstanding your requirement.

 

David

0 Kudos
Message 4 of 8
(2,844 Views)

Hello.

 

   Ok...I will try this and get back to you. thank you!

Regards,


Kaspar
0 Kudos
Message 5 of 8
(2,842 Views)
Unless what he means is that the Main program loads/launches .exe's as "test programs". The file info function would still be the one then, it would just have to have the path to the "exe" being called. Otherwise, as you have mentioned, the code supplied will give the "creation date" of the "containing file" which in the development environment would be the "Main", in the running as an Executable, will be the executable's creation date. That file stripping is a "gotcha" for a lot of folks the first time they create an exe and file paths, etc., don't work.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 6 of 8
(2,828 Views)

Yep, I wasn't sure if the OP was talking about the exe's he was calling from some sort of test execution sequence engine either, but as you say its very simple to get the date of of the individual exe.

 

I am sure Kaspar will let us know more when he gets the time.

 

David

Message 7 of 8
(2,825 Views)

Hello,

 

   I am able to get the date of the exe, I am a happy camper! Thanks for your help!

Smiley Very Happy

Regards,


Kaspar
0 Kudos
Message 8 of 8
(2,729 Views)