hardenDefaultsAgain restores the original settings and hardens using the default settings (no custom settings apply).
()
| 455 | // hardenDefaultsAgain restores the original settings and |
| 456 | // hardens using the default settings (no custom settings apply). |
| 457 | func hardenDefaultsAgain() { |
| 458 | showEventsTextArea() |
| 459 | |
| 460 | // Use goroutine to allow gui to update window. |
| 461 | go func() { |
| 462 | // Restore hardened settings. |
| 463 | triggerAll(false) |
| 464 | restoreSavedRegistryKeys() |
| 465 | markStatus(false) |
| 466 | |
| 467 | // Reset expertConfig (is set to currently already hardened settings |
| 468 | // in case of restore). |
| 469 | expertConfig = make(map[string]bool) |
| 470 | for _, hardenSubject := range allHardenSubjects { |
| 471 | expertConfig[hardenSubject.Name()] = hardenSubject.HardenByDefault() |
| 472 | } |
| 473 | |
| 474 | // Harden all settings. |
| 475 | triggerAll(true) |
| 476 | markStatus(true) |
| 477 | showStatus() |
| 478 | |
| 479 | showEndDialog("Done!\nRisky features have been hardened!\nFor all changes to take effect please restart Windows.") |
| 480 | os.Exit(0) |
| 481 | }() |
| 482 | } |
nothing calls this directly
no test coverage detected