Author Topic: compiler plugin works only with admin rights  (Read 6883 times)

mariocup

  • Guest
compiler plugin works only with admin rights
« on: July 20, 2007, 11:26:28 pm »
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:
Code
    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);
        }
     }

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: compiler plugin works only with admin rights
« Reply #1 on: July 21, 2007, 12:34:25 am »
Have you reported that in berlios yet?

mariocup

  • Guest
Re: compiler plugin works only with admin rights
« Reply #2 on: July 21, 2007, 12:55:23 am »
Hi rickg22,

no, I found the problem right now with my PC and Browse Tracks Plugin. Shall I open a bug in berlios for it?




Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: compiler plugin works only with admin rights
« Reply #3 on: July 21, 2007, 05:00:44 am »
Yes, please. Otherwise the bugs get lost in this forum jungle.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: compiler plugin works only with admin rights
« Reply #4 on: July 22, 2007, 11:51:57 am »
I can't really reproduce it. I'm running C::B always from a restricted user account (as I am always a restricted user). Not even Power User, just user. It works very well...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

mariocup

  • Guest
Re: compiler plugin works only with admin rights
« Reply #5 on: July 22, 2007, 01:06:41 pm »
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.)

Code
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.)


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5503
Re: compiler plugin works only with admin rights
« Reply #6 on: July 22, 2007, 01:51:42 pm »
well, if you have patches, please post them.
I will apply them, if we don't need write rights, then we should not open something with write rights. It will also be more safe.

mariocup

  • Guest
Re: compiler plugin works only with admin rights
« Reply #7 on: July 22, 2007, 03:00:22 pm »
Hi killerbot,

Mandrav said that he will add me to the committers list, so I will be able to update the documentation for codeblocks. Shall I commit the changes for the sources or better post the patches on berlios?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: compiler plugin works only with admin rights
« Reply #8 on: July 22, 2007, 04:08:04 pm »
Mandrav said that he will add me to the committers list, so I will be able to update the documentation for codeblocks. Shall I commit the changes for the sources or better post the patches on berlios?

If you've been given full access to the repo, then you'll be able to commit it. Otherwise pass it to anyone of us and we'll put it in repo. :)
Be a part of the solution, not a part of the problem.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2785
Re: compiler plugin works only with admin rights
« Reply #9 on: July 22, 2007, 04:20:13 pm »
Here a example the log of browse Tracker (only the compiler with read/write access to the registry issue an error.)

Did I accidently leave the BrowseTracker log active, or did you turn it on yourself ?

I really didn't mean to publish BrowseTracker with the log polluting the users screen.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5503
Re: compiler plugin works only with admin rights
« Reply #10 on: July 22, 2007, 05:48:13 pm »
Hi killerbot,

Mandrav said that he will add me to the committers list, so I will be able to update the documentation for codeblocks. Shall I commit the changes for the sources or better post the patches on berlios?

You choose, you can have your very own first commits, or you pass the patch and we commit it ;-)

mariocup

  • Guest
Re: compiler plugin works only with admin rights
« Reply #11 on: July 22, 2007, 06:43:49 pm »
Hi Pecan,

I did no activate any log. I was wondering if there is a option to disable the log window.
In the menu of Browser-Tracker is a small typo: foreward instead of Foreward.

I saw also some typos in the Settings/Environment: To-Do and To-do list. This is not really disturbing, but perhaps you want to change it.

A few days ago I saw that you made changes to the browser Tracker plugin, but did not find any info. I think it would be easier if the index of the wiki page would show something like New, Update for the entries.

Another possibility is to have the nice plugins like ThreadSearch, Browser Tracks under svn (like the Shell extension plugin), so the user can check out them under the contrib directory and make a svn update to see the logs etc., test new features and not searching the forums or the wiki page.

What do the CB team think about that?