InstallUsingBootstrapper will extract the embedded bootstrapper from Microsoft and run it to install the latest version of the runtime. Returns true if the installer ran successfully. Returns an error if something goes wrong
()
| 90 | // Returns true if the installer ran successfully. |
| 91 | // Returns an error if something goes wrong |
| 92 | func InstallUsingBootstrapper() (bool, error) { |
| 93 | |
| 94 | installer, err := downloadBootstrapper() |
| 95 | if err != nil { |
| 96 | return false, err |
| 97 | } |
| 98 | |
| 99 | result, err := runInstaller(installer) |
| 100 | if err != nil { |
| 101 | return false, err |
| 102 | } |
| 103 | |
| 104 | return result, os.Remove(installer) |
| 105 | |
| 106 | } |
| 107 | |
| 108 | func runInstaller(installer string) (bool, error) { |
| 109 | // Credit: https://stackoverflow.com/a/10385867 |
nothing calls this directly
no test coverage detected
searching dependent graphs…