Page 1 of 1

IM limitation and the Windows registry

Posted: 2011-12-20T18:26:37-07:00
by donovaly
Dear developers,

I use IM for an open source programs on Windows (namely for LyX). I have an installer that installs the whole bundle of LyX, Ghostscript and IM. It works fine so war, but only if the installation is done with admin permissions. But for none of the programs admin permissions are really necessary, only IM requires settings in

HKLM/Software/ImageMagick

I tried to just copy the IM files to a folder without setting any registry settings but that is not possible. I also tried to write the registry settings to HKCU instead of HKLM, but that also doesn't work.
It would be very, very useful, if IM does not require a registry key in HKLM. If registry keys are really necessary, it should allow to write them in HKCU.

Can this be implemented and/or is there any workaround?

thanks and regards
Uwe

Re: IM limitation and the Windows registry

Posted: 2011-12-20T19:22:04-07:00
by magick
Both methods should be supported (HKLM & HKCU) but we don't have the time to handle both right now. Look for HKCU in the next release of the ImageMagick binaries in about a week.

Re: IM limitation and the Windows registry

Posted: 2012-01-02T18:48:46-07:00
by whugemann
Right now, IM's Windows setup programm seems to write registry keys exclusively to HKCU instead of HKLM (at least version 6.7.4-2 on my Vista computer). This breaks code like presented in http://www.imagemagick.org/Usage/windows/#debugging, where the installation path is read from the registry. Is this intended to stay this way in the future?

I object to this change: Settings that affect every user should be stored in HKEY_LOCAL_MACHINE (HKLM), whereas HKEY_CURRENT_USER (HKCU) is intended for user-specific settings. Do you really think, the current version of IM should be a user-specific setting? How would you handle a situation where on user installed IM and another user installs a newer one? I think that this change will lead to trouble on the long run (not only with my code).

If you take a look in the registry, you will find that almost any program (including Gnu, Cygwin and Ghostscript) write part of their keys into the HKLM section of the registry. This means that you need adminstrator rights in order to run their installations. If you are not logged on as the local adminstrator (I bet that 99% of all users, including me, are), you can easily run the installation in adminstrator mode and thereby allow it to set HKLM keys.

I think that we should have discussed the implications of this change before you actually made it.

Re: IM limitation and the Windows registry

Posted: 2012-01-28T08:07:12-07:00
by whugemann
I think the viewtopic.php?f=1&t=20201 demonstrates the possible problems that can arise from this change.