Q: May I copy a music disc for a friend that I am absolutely certain would not buy it, since he's not a potential customer anyway?
A: According to the opinion that the creator of intellectual property has ownership, some consider one who copies illegally as "stealing" (gezel). This is prohibited even if the person receiving the copy is not a potential customer.
Even if we consider this "zeh neheneh z'veh lo chaser" (the friend gains and the creator doesn't lose), the Shulchan Aruch (C.M. 363:6) rules that one can refuse usage of his property even when he doesn't lose. Moreover, "zeh neheneh v'zeh lo chaser" applies to temporary usage, not taking permanent possession of another's item.
However, according to the opinion that halacha does not recognize ownership of intangible "intellectual property" there isn't clear halachic basis to prohibit copying when there is no financial impact, although morally inappropriate. In many places, though, it would be prohibited based on dina d'malchusa.
Copying a computer program is prohibited, though, since nowadays these are almost always "licensed," not "sold," which retains the company greater rights.
(See Emek Hamishpat, Zechuyos Yotzrim, Intro. ch. 3; ch. 28-29)