How do I solve problem with "Invalid value for registry"?