Perform upgrade only if not missing.
Get exit status in Windows by parsing the output.
Better cleanup strategy in upgrade script. A few additional checks too.
Variables