The Installer for 13.12 stores the uninstall information in the registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\CodeBlocks
Neither does this path usually exist, nor is it checked by Windows (as users do not have Uninstall Information).
The correct path should be:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\CodeBlocks
Well I am not sure if that is correct as users can have per-user installer if it is done correctly. In fact, in my registry there are several entries under that node.
What actually counts is if the installer is working - and that is the case. Install an uninstall works and nothing s left in the registry.
What installer did you use? User/Default? Have you used an admin account or privileged?
We have an Active Directory at the university. The software is deployed via baramundi, which uses a service user for installation.
This means: neither can any of the other administrators use the uninstall function from programs and features, nor is it possible to run, say, a batch file, that uses "wmic product ..." as any different user (Haven't checked msiexec though, but I'm guessing it will fail to find anything).
It does make some kind of sense for a single user, that is admin anyway or chooses to install the software to his own profile * cringe *, but wouldn't it be reasonable to use HKEY_LOCAL_MACHINE, since an elevation is needed to write to "C:\Program Files (x86)" anyway?
Last edit: JoeySun 2015-03-21
"...but wouldn't it be reasonable to use HKEY_LOCAL_MACHINE..."
Maybe. Since UAC was introduced a lot software (including Google) installs their apps into the user's profile folder as the "work-around" to avoid elevation. Maybe its even "allowed" by Microsoft I didn't read the specification.
It is as it is because a lot C::B users requested to have an installer that do not need admin rights. So we did this not because it was our our idea and in fact it causes a lot trouble as people tend to pick the wrong installer. For me, a standard user should simply use a copy of an installed C::B because C::B actually does not need an installer! Extracting from an archive (like the nightlies) would be enough as we don't use any Windows registry stuff (besides file extension handling, but that's assigned at runtime, not during install). For a deployment I would recommend doing exactly the same, btw...
Anyways - I'll see what I can do for the next release. If you know NSIS you can provide patches to fix this. The path to the NSIS installer script in SVN is:
http://svn.code.sf.net/p/codeblocks/code/setup/setup.nsi
I can see where this makes sense. However, I noticed that all of the installers immediately exit, when they are run by a regular user and elevation is cancelled.
I myself lack the time and NSIS skills to accomplish this, but I think the right way to go about this, would be to display a dialogue asking the user, whether the software should be installed for the current user (to profile, with HKCU key) oder for all users (to program files, with HKLM key) and then asking for elevation depending on the choice.