MCPcopy Create free account
hub / github.com/T3nb3w/ComDotNetExploit / CleanOnlyUseLatestCLR

Method CleanOnlyUseLatestCLR

Bypass_COM_PPL/registry_utils.cpp:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83bool 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected