You compare the fileversion with the desired fileverison, e.g by using the CompareVersions() UDF. If the fileversion is lower than the desired one, then you run the installer with the command line switches provided in my link. No need to use SENDKEYS.
code:
; framework only
$currentver='2.70'
$ver=getfileversion(...)
if compareversions($ver,$currentver)
; run installer
endif

_________________________
There are two types of vessels, submarines and targets.