The automatic update system does the first three for you; turn it on.
Or, if you want to rewrite that system, you can:
- Copy the URL from Help > Check for Updates > Check Now
- Read the version number of the currently installed Rhino 6 from HKEY_LOCAL_MACHINE\Software\McNeel\Rhinoceros\6.0\Install\Version, and put that at the end of the updates URL.
- Use your favorite programming language to fetch the results of the URL
- Scrape the page that is returned for the URL of the Rhino installer
- Download it
- Run it
- Process all the possible failure codes when install fails, and notify the user as appropriate. Note that under some circumstances, the installation will be incomplete, requiring the user to restart Rhino. This happens most frequently when you silently install while Rhino is running, but happens at other unexpected times, too.
Hope that helps.