bugmenotagain, структуру reg: нельзя применять в коде
Код:
![Выделить весь код](images/misc/selectcode.png)
[ Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
AppPath, key, InstallLocation: string;
ResultCode: Integer;
begin
if (CurStep = ssDone) and (IsComponentSelected('port')) then begin
key := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant('{#SetupSetting("AppID")}') + '_is1';
RegQueryStringValue(HKLM, key, 'InstallLocation', InstallLocation);
MsgBox('Key = ' + key + #13#10 + 'InstallLocation = ' + InstallLocation, mbInformation, MB_OK);
AppPath := RemoveBackslashUnlessRoot(RemoveQuotes(InstallLocation));
Exec(AppPath + '\uninstall\unins000.exe', '/VERYSILENT', '', SW_SHOW, ewNoWait, ResultCode);
end; //if (CurStep = ssDone) and (IsComponentSelected('port'))
end;
КМК это не сработает, ты ставишь ее и тут же на последнем шаге сносишь, хотя флаг uninsneveruninstall присутсвует, может и сработать
Вот что точно левое так это секция [UninstallDelete]