Hi,
in the compilers Cygwin, GDC, MINGW, MSVC, MSVC8, SDCC the registry is read with key.Open() in read/write mode. This works only with admin rights for users under windows, otherwise you get an error.
So the registry should be opened in read mode with key.Open(wxRegKey::Read):
Example:
wxRegKey key; // defaults to HKCR
key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Name\\"));
if (key.Exists() && key.Open(wxRegKey::Read))
{
// found; read it
if (key.HasValue(_T("InstallPath")))
{
key.QueryValue(_T("InstallPath"), m_MasterPath);
}
}
Hi MortenMacFly,
I changed the code for e.g. ARM in read mode so the error is elminated. The problem with the access occurs specially if you start CB for the first time without an existing default.conf.
Here a example the log of browse Tracker (only the compiler with read/write access to the registry issue an error.)
13:10:29: BrowseTracker Plugin Logging Started[0.1.7 2007/06/7]
13:10:29: Argv[0][D:\eigene_dateien\codeblocks-trunk\src\output\codeblocks.exe] Cwd[D:\eigene_dateien\codeblocks-trunk\src\output]
13:10:29: FindAppPath: AbsolutePath[D:\eigene_dateien\codeblocks-trunk\src\output]
13:10:29: CfgFolder[C:\Dokumente und Einstellungen\lumi\Anwendungsdaten\codeblocks]
13:10:29: ExecFolder[D:\eigene_dateien\codeblocks-trunk\src\output]
13:10:29: TrackerCfgFullPath[C:\Dokumente und Einstellungen\lumi\Anwendungsdaten\codeblocks\BrowseTracker.ini]
13:10:29: Menubar[00EDC3C8]idMenuViewTracker[895]
13:10:29: Error: Execution of command 'C:\MinGW\bin\mingw32-gcc.exe --version' failed (error 3: das System kann den angegebenen Pfad nicht finden.)
13:10:29: Error: Can't open registry key 'HKLM\Software\Dev-C++' (error 2: das System kann die angegebene Datei nicht finden.)
13:10:29: Error: Execution of command 'C:\MinGW\bin\mingw32-gcc.exe --version' failed (error 3: das System kann den angegebenen Pfad nicht finden.)
13:10:29: Error: Can't open registry key 'HKCU\Software\Microsoft\Win32SDK\Directories' (error 2: das System kann die angegebene Datei nicht finden.)
13:10:29: Error: Can't open registry key 'HKCU\Software\Microsoft\DebuggingTools' (error 2: das System kann die angegebene Datei nicht finden.)
13:10:29: Error: Can't open registry key 'HKCU\Software\Microsoft\Win32SDK\Directories' (error 2: das System kann die angegebene Datei nicht finden.)
13:10:29: Error: Can't open registry key 'HKCU\Software\Microsoft\MicrosoftSDK\InstalledSDKs' (error 2: das System kann die angegebene Datei nicht finden.)
13:10:29: Error: Can't open registry key 'HKCU\Software\Microsoft\DebuggingTools' (error 2: das System kann die angegebene Datei nicht finden.)