import psutil
process = filter(lambda p: p.name() == "YourProcess.exe", psutil.process_iter())
for i in process:
print i.name,i.pid
Дайте все pids «YourProcess.exe»
Вы должны определить SaveValueToXML
перед UpdateImageLoaderConfigValues
:
[Files]
Source: ...; AfterInstall: UpdateImageLoaderConfigValues()
[Code]
function SaveValueToXML(const AFileName, APath, AValue: string);
begin
// ...
end;
procedure UpdateImageLoaderConfigValues();
begin
SaveValueToXML(ExpandConstant('{app}\ImageLoader.exe.config'),{#ImageLoaderLastConfigurationPath}, ExpandConstant('{app}/Configurations'))
SaveValueToXML(ExpandConstant('{app}\ImageLoader.exe.config'),{#ImageLoaderLastImagePath}, ExpandConstant('{app}/Images'))
end;