Connecting Arduino to computer and powering other devices

I am trying to build a project where Arduino controls another device (on/off) with transistor which is connected to 12V power supply and also arduino to be able to communicate with the computer which is another power source. Transistor won't work if I use 2 power supplies (1 for the high voltage and 1 to activate) so what is the best way to control that device on high voltage and also have Arduino USB communication?

Burek:
Transistor won't work if I use 2 power supplies

I don't know why you think that.