Ветеран
Сообщения: 649
Благодарности: 444
|
Профиль
|
Отправить PM
| Цитировать
LinkOFF, фапай код:
читать дальше »
Код: 
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
AppId=The_Best_AppId
[ code]
function InitializeSetup(): Boolean;
var
AppPath, UninsPath: string;
ResultCode: Integer;
begin
AppPath := RemoveQuotes(ExpandConstant('{reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1,InstallLocation|}'));
UninsPath := RemoveQuotes(ExpandConstant('{reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1,UninstallString|}'));
if (AppPath <> '') then
begin
Result := MsgBox('Программа установлена' +#13#10+ 'Удалить?', mbError, MB_YESNO) = IDNO;
if not Result then Exec(UninsPath, '', '' , SW_SHOW, ewNoWait, ResultCode);
end else Result := True;
end;
поставь где-нибудь El Sanchez-у спасибо, тк дёрнул значения переменных из его кода авторана халфы!
|
Отправлено: 02:57, 15-10-2012
| #1132
|