Here's a little snippet to use when creating a new user with entity_metadata_wrapper():
// Get an empty object with the is_new attribute set to TRUE.
$user = entity_create('user', array());
// Define specific role IDs for the user.
$roles = array(3, 4, ...);
$user->name = 'username';
// Enable the user by