You're going to hate me for saying this, but I think that you're going to have to go into your registry and delete the registry keys. Do you know what I'm talking about? I'm going to assume that you're dealing with Windows XP and not with Vista. I haven't a clue about Vista, so if you've got Vista, I'm afraid you're SOL.
You have to be VERY, VERY careful when you do this, or you'll end up having to reinstall Windows! Do it at your own risk. If you have any questions, please ask them now before you attempt this.
1) Go to Windows' "start" menu and click on "Run."
2) Type "regedit" (without the quotes) in the box that appears and click "OK." This will open Windows' registry editor.
3) Click on "HKEY_LOCAL_MACHINE" and then "SOFTWARE."
4) Look for any Lucasarts and Bioware entries. If you have any other Lucasarts or Bioware games installed, then there will be multiple sub-entries under each company name. In that case, you'll have to delete only the sub-entries that have to do with KotOR. I'm telling you this because I have multiple games from both companies installed and I've had to do this before. The sub-entries should be pretty self-evident. If you don't have any other Lucasarts or Bioware games installed, then you can delete the entire entry.
5) Delete entries by right-clicking on it and choosing "Delete" and confirming the deletion.
6) You have now uninstalled the game manually. Exit the registry editor. You're done and you should now be able to reinstall the game.
"Mind your wants, 'cause someone wants your mind."