[Magick-bugs] ImageMagick messes up PATH
Zlatko Lovcevic
zlatko.lovcevic at dmsgroup.rs
Wed Jun 10 07:48:17 PDT 2009
duc.sequere.aut.de.via.decede at imagemagick.org wrote:
>> adding your own code for appending to Path
>>
>
> We're primarily Linux developers meaning anything Windows gets done but at
> a snails pace. Do you have code that correctly implements the
> functionality of the PathTool.exe utility?
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4143 (20090610) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
Since you are using InnoSetup you could use this in [Code] section:
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
sPath: string;
begin
case CurStep of
ssPostInstall:
begin
sPath := GetEnv <topic_isxfunc_getenv.htm>('Path');
sPath := sPath + ';' + ExpandConstant('{app}');
RegWriteStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path',
sPath);
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
sPath: string;
begin
case CurUninstallStep of
usPostUninstall:
begin
sPath := GetEnv <topic_isxfunc_getenv.htm>('Path');
Delete(sPath, Pos(';' + ExpandConstant('{app}')),
Length(';' + ExpandConstant('{app}'));
RegWriteStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path',
sPath);
end;
end;
I haven't had time to check this code so you will have to do it yourself.
More information about the Magick-bugs
mailing list