auto detect registry path