Invariant Theory Of Preprojective Algebras