  In this paper we study various forms of (hereditary) structural completeness
for quasivarieties of algebras, using mostly algebraic techniques. More
specifically we study relative weakly projective algebras and the way they
interact with structural completeness in quasivarieties. These ideas are then
applied to the study of $C$-structural completeness and $C$-primitivity,
through an algebraic generalization of Prucnal's substitution. Finally we study
in depth dual i-discriminator quasivarieties in which a particular instance of
Prucnal's substitution is used to prove that if each fundamental operation
commutes with the i-discriminator, then it is primitive.
