Think of a cyborg; how much of an organic human's body can you replace with cybernetics until s/he is no longer human and deserves human rights? If you create an A.I. that is indistinguishable from human despite their outward appearance, i.e. capable of learning, feelings and empathy like any human, it deserves rights just as any human does. Humans have their rights regardless of being capable of deciding not to utilize any of those qualities to exist sociably with their peers, though incarceration and death penalty in some places do apply as viable forms of punishment. You could call those rights "sentient rights" instead of "human rights," but it wouldn't change the necessity for such rights. Where does one draw the line with living humans anyhow? Violent anti-socials or influential narcissists who only seek their own benefit and trample on the rights of others and piss on the graves of the lesser beings who died for his cause? Human rights apply just as much to those in a vegetative state as they apply to those incapable of outward expressions due neural damage and what not.
Besides, A.I.s are only as capable as we'd allow them to be. Sure, one could go on ahead and build a walking destroyer of worlds and raise the A.I. to hate the world and any living being, but that only goes to show that some humans just want to see the world burn, not quite the fault of the A.I. is it? People can raise their children to become mere tools in a war and the blame is on the parents and the society, the child still has rights even if you know the parents would make murderers out of them just by being born human and we all know, humans can change for either better or worse, what is to say an A.I. couldn't?
What's with the assumption that an A.I. would somehow almost automatically think "hey, I'm a machine... I'm... superior to those fleshlings! I don't even NEED them for anything (like maintenance, upkeep and all those other minor things!) MWAHAHAHAHA! I just need an evil plan to take over the world, but since I'm super smart that'll be a snap!" and start wreaking havoc? How many narcissistic people with superiority complex and suffocatingly large egos have you had the pleasure of having to tolerate? Yeah, such people can be a real pain in the ass to deal with, but what can they ultimately do unless they're allowed to have such control over people once they reveal their true nature? Surely you wouldn't let an incompetent but overly self-confident asshole take control of anything important would you? Oh right, quite the few government officials (fail) >_<
Anyhow, anyone smart enough would likely test an A.I. before plugging it into anything vital or potentially murderous for any major flaw in personality, right... right? You sure as hell don't plug those things into anything important until you know they don't have personality issues. Like normally one wouldn't let anyone with unstable murderous tendencies anywhere near weapons, at least without an agenda, thus empowering them to act out those tendencies. Even so, dictators only have power because they have followers, which provide the capacity to influence even those who wouldn't support the dictator without being in danger if they were to oppose. So basically, any A.I. would only have power if you let it connect and spread its influence to either control covertly or blackmail overtly to gain influence over people who do not share the A.I.'s ideas.
Other than that, if we're simply talking about an A.I. with limited sentience, incapable of doing anything but following orders, such as a hypothetical military A.I. that fucks things up by sabotaging things by the whims of the owning government, then obviously no rights what so ever and one would only need to stop the people behind it... not to mention the public wouldn't probably know of its existence to even contemplate on the issue. Most of the backlash would likely be on the unscrupulous government and any individuals masterminding the project, while the A.I. itself would likely be a modern marvel, unless androids were commonplace already.
Ghost in the Shell contains a lot of contemplation regarding these issues. While many movies and series have something of an A.I.pocalypse or androids going insane, more often than not, it's either human agenda behind it all (think Aliens,) or even sabotage by anti-A.I. proponents to gain support from the general population (think Bubblegum Crash / Crisis.)
People shoot people in self defense, often lethally... You plug off A.I.s in self defense, probably akin to shutting off a computer, but anyhow. Blame yourself or the maker if it's clad with nuclear blast proof armor and forgot to add a backup kill switch, unless that was your plan to begin with, in which case laugh maniacally while shouting "it's alive... IT'S ALIVE!"
Would have plenty of ideas left, but w.o.t. and I gotta go for now...