OK, if you can access your variables then you are NOT in differed action. Deferred action cannot access any property at all. That is why you need to push it into customData.
Then most likely you are accessing the property using invalid name. From my memory it might be "InstallMode" not "WixUI_InstallMode".
Then most likely you are accessing the property using invalid name. From my memory it might be "InstallMode" not "WixUI_InstallMode".