diff --git a/Source/common/ExceptionHandler.cpp b/Source/common/ExceptionHandler.cpp index 55348dc..f95d974 100644 --- a/Source/common/ExceptionHandler.cpp +++ b/Source/common/ExceptionHandler.cpp @@ -817,7 +817,6 @@ static void WriteMiniDump(LPCTSTR pszPath, PEXCEPTION_POINTERS pExceptPtrs) void WriteRegistryDetails(LPCTSTR pszPath) { - WriteRegistryTreeToFile(_T("HKLM\\Software\\Perforce"), pszPath); WriteRegistryTreeToFile(_T("HKCU\\Software\\Perforce"), pszPath); } diff --git a/Source/gui/MainFrm.cpp b/Source/gui/MainFrm.cpp index 22aa8fa..0230cfc 100644 --- a/Source/gui/MainFrm.cpp +++ b/Source/gui/MainFrm.cpp @@ -615,13 +615,6 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) MainFrameCWnd = this; - // Vista sucks and won't let us write to HKEY_LOCAL_MACHINE - // unless we have elevated privilages. But those writes - // happen in the p4api and don't return status. So write - // a dummy key for testing and report any failure. - - GET_P4REGPTR()->TestRegWrite2HKLM(); - // This timer is here to support auto-update and miscellaneous // tasks. Will result in OnTimer() being called every .2 secs. // The interval is a compromise between diff --git a/Source/gui/P4Registry.cpp b/Source/gui/P4Registry.cpp index cc64325..e13e370 100644 --- a/Source/gui/P4Registry.cpp +++ b/Source/gui/P4Registry.cpp @@ -4931,33 +4931,6 @@ void CP4Registry::WriteVirginRegistry() RegCloseKey(key); } -BOOL CP4Registry::TestRegWrite2HKLM() -{ - HKEY hKey = NULL; - CString sKey = _T("Software\\Perforce\\environment\\"); - DWORD disposition; - TCHAR test[] = _T("test"); - LONG rc; - if ( (rc = RegCreateKeyEx( HKEY_LOCAL_MACHINE, sKey, - 0, NULL, - REG_OPTION_NON_VOLATILE, - KEY_READ|KEY_WRITE, NULL, - &hKey, &disposition )) == ERROR_SUCCESS ) - { - disposition = sizeof(test); - rc = RegSetValueEx(hKey, _T("P4Win"), NULL, REG_SZ, - (LPBYTE)test, disposition); - } - - if (rc != ERROR_SUCCESS ) - { - RegWriteFailed(rc); - return FALSE; - } - return TRUE; -} - - void CP4Registry::RegWriteFailed(LONG rc) { LPVOID lpMsgBuf; diff --git a/Source/gui/P4Registry.h b/Source/gui/P4Registry.h index 9b4d25a..c8d797f 100644 --- a/Source/gui/P4Registry.h +++ b/Source/gui/P4Registry.h @@ -885,7 +885,6 @@ class CP4Registry void ReadDiffAssocList(); void ReadMergeAssocList(); CString GetPasswordfromReg( ); - BOOL TestRegWrite2HKLM(); protected: POSITION FindAssociation(LPCTSTR extension);