How to get the new version number before installing the new updates

Hi There, Our program includes server part and client part. We need to make sure the server part get updated first then the client part.I am thinking to save the latest version number in the database after server part is updated, and check the latest version number before update the client part.

My question is: how can I get the latest version number before client part is updated? I didn't find anything in the AutomaticUpdater1_BeforeInstalling(sender As System.Object, e As wyDay.Controls.BeforeArgs)

Or is there a better way to do it?