I agree with @elextr that this is not the right approach. @egnun please tell if you are going to work on the suggested solution (read available licenses from a directory). Otherwise I'll close this in the near future since it's not acceptable in the current form.