Like stated hereHalvhjearne wrote: but "normally" theres actually nothing illegal in installing it on any pc (as long as you inform ppl that it is there) ...
Even if its your computer you do not have permission to record others without your authorization/knowledge.
Just put it this way: "Is it legal for companies to put recording cameras in their restrooms" ?
The only way you can get away with this is : have a disclaimer they must agree when logging into the computer.
AKA a pop-up that wont let them work unless they accept.
Which clearly says the actions being recorded.
Have consent (signed) by the user.
Its your computer YES. but your recording other individuals data and thats suable.
BTW: this applies to US and US territories.