Getting Versions of Software
I'm trying to go about getting the versions of different pieces of software. I'm using VBA (I'm unable to use anything else) and I've come up with 3 ways this could be one.
1) Look for files in the install directory that would have version info and parse the file.
2) Since this will be under Windows, the .exe properties has version info.
3) Look up registry keys that would contain the version information.
Here's the problems I've encountered with each:
1) Parsing is different for each file, thus, separate code would be needed for each different piece of software I'm trying to get version information for.
2) Not exactly sure how to do this. I've seen some Win API stuff, but haven't been able to get it to work. The MSDN info is too generic about declaring the functions, so I'm not sure what parameters are what type or what exactly each parameter is.
3) Similar to #2, though I have been able to find more information about it, everybody seems to implement it differently. Again, the MSDN stuff is too generic for me and what I have been able to implement, that seems right to me, just crashes Test Partner all together. I've tried the "RegRead" method, but I'm not going to be sure what software is on what environment and if it couldn't find the registry setting, it would error out on me, so I wouldn't be able to loop through a list of entries.
I'm assuming that either methods 2 or 3 would be the fastest, but they also seem to be the most difficult to implement thanks to such sparse documentation. I need a way that doesn't require knowing what software is actually installed on the environment, I'm just testing to setup environment variables that can change per environment. Any ideas? I can share code if need be, but again, it doesn't seem to work, so I'm not sure if it's my code, or maybe a Test Partner reference I'm missing? Any info would be great.