A quick first stab at the registry based installation

This gets registry based installation somehow working. It is not
complete but this is a good point to commit before going on.