A polyimide resin, characterized in that the polyimide resin comprises
three kinds of repeating units represented by the formula (1), and has a
weight average molecular weight, reduced to polystyrene, of from 5,000 to
500,000, an acryl equivalent of from 400 to 3,000 g/eq, and a carboxylic
acid equivalent of from 300 to 2500 g/eq ##STR00001## wherein X is a
tetravalent organic group, Y is a divalent organic group, Z is a divalent
organic group, W is a divalent organic group having a polyorganosiloxane
structure. The polyimide resin is suitable for preparing a patterned or
non-patterned protective coating.