B4J Question Get B4A Path

wonder

Expert
Licensed User
Longtime User
Hi! :)

Is there a quick way to get the B4A path, for example:
"C:\Program Files (x86)\Anywhere Software\B4A".

Perhaps a code snippet? Thanks in advance!! :)
 
You can narrow down the search if you suspect it will be in the Program Files (x86) or the Program Files folders. Those searches will be a lot quicker. You can also test all the drive letters to see if they contain a Program Files (x86) or Program Files folder. There's a bit you can do to streamline this.
 
Upvote 0
the fastest would be this

Code: Copy
reg query "HKCR\B4A Source Code\DefaultIcon"

and parse the result

Code: Copy
HKEY_CLASSES_ROOT\B4A Source Code\DefaultIcon
    (standaard)    REG_SZ    C:\Program Files\Anywhere Software\Basic4android\B4A.exe,0
 
Upvote 0
I don't know if B4J supports regRead if not you can call the above which doesn't require an additional file or use an addition batch/vbscript file.
 
Upvote 0
Back
Top