Basically all you need to do is add an hidden field named role and set the value to whatever role you want on the register form.
add_action('register_form','show_role_field');
function show_role_field(){ ?>
<input id="role" type="hidden" tabindex="20" size="25" value= "<?php if (isset($_GET['role'])){echo $_GET['role'];} ?>" name="role"/>
<?php
}
Next thing is to register that role when the user has submitted the registration form.
add_action('user_register', 'register_role');
function register_role($user_id, $password="", $meta=array()) {
$userdata = array();
$userdata['ID'] = $user_id;
$userdata['role'] = $_POST['role'];
//only allow if user role is my_role
if ($userdata['role'] == "my_role"){
wp_update_user($userdata);
}
}
Now all that is left to do is direct the user to the register url with the role that you want as a query var, for example
http://example.com/wp-login.php?action=register&role=my_role
You can read more http://www.jasarwebsolutions.com/2010/06/27/how-to-change-a-users-role-on-the-wordpress-registration-form/
And i would suggest that you check to validate the role is allowed to register before saving it so you wont get a few new admins in your site.