i have been trying to plug my xbee by USB but it keeps saying the device was not successfully installed?

Who’s USB board are you mounting your XBee module on? Have you tried installing the driver from that vendor?