[Gadget]: detect and apply registry changes on gadget upgrade