| 81 | } |
| 82 | |
| 83 | bool RegistryUtils::CleanOnlyUseLatestCLR() { |
| 84 | HKEY hKey; |
| 85 | LPCWSTR subKey = L"SOFTWARE\\Microsoft\\.NETFramework"; |
| 86 | LPCWSTR valueName = L"OnlyUseLatestCLR"; |
| 87 | |
| 88 | // Open the key first |
| 89 | LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, &hKey); |
| 90 | if (result != ERROR_SUCCESS) return false; |
| 91 | |
| 92 | // Delete the value |
| 93 | result = RegDeleteValue(hKey, valueName); |
| 94 | RegCloseKey(hKey); |
| 95 | |
| 96 | return (result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND); |
| 97 | } |
nothing calls this directly
no outgoing calls
no test coverage detected