Do you absolutely own, a program or piece of code you pay a developer for, or do they inherently maintain rights, like microsoft and windows, or does it differ on a case by case basis as per your agreement with the developer ?
That depends on whose laws you're talking about. US law at the very least says you own the copyright to something you create or design yourself. I forgot the details behind one exception to that, absent of any agreements between you and the other party.
My guess is that you are not talking about the developer being an employee (on you payroll) so the creator owns the rights, but those rights can be conveyed to the person who paid them for the work. If you want to "own" the rights, it should be in a written agreement (verbal agreements are legal, but much harder to enforce/prove in a dispute).
If you are hiring a freelancer to develop a script for you that you then intend to resell, then you must include ownership/resale rights in the contract. You'll find that the price of the work increases but you need to get something signed saying that you own the resulting work. Saves time, aggravation and expensive lawyer bills later.
Unless you specifically and in writing say that the payer is the coder, the coder retain the rights. Peace,
You only get the rights to the code IF you declare that you want exclusive rights when negotiating your agreement with the coder.