Am trying to figure out where to look for finding out the current version of minecraft installed my pc. I can see the current version, if I open up the Minecraft.exe launcher.
I tried to search in Windows Registry to see if there is any entry regarding the current version. But didn't found any when I searched for the term
minecraft. And I can see that, this folder
C:\Users\USERNAME\AppData\Roaming\.minecraft\versions contains the sub-folder
1.7.4 which is the current version!
So, is that the only place we can check to find out the current version?
I am trying to fetch the version via code (creating VB.Net app). I can do a scan for the sub-folders in the
..\.minecraft\versions folder and could find out the version number. But what if that
versions folder contains another folder say
1.8.2 with a JAR and JSON file? My idea of fetching the current version would fail then! Because the
versions folder contains two folders
1.7.4 (which is the current version) and the
1.8.2 (which is a duplicate of the contents of the folder 1.7.4, I created for testing). In my code, it would find out the current version as
1.8.2, which would be wrong! Because when the MC launcher is opened, it still shows the
1.7.4 as the current version!
So, what would be the effective way/place to look for finding the currently installed version? Any hints would be highly appreciated.