View Single Post
  #32  
Old 16-11-2014, 04:55
Logrim Logrim is offline
Registered User
 
Join Date: Jun 2009
Location: Spain
Posts: 153
Thanks: 116
Thanked 72 Times in 44 Posts
Logrim is on a distinguished road
Quote:
Razor12911
i like the audio in this way :P..
mm,,in the way i made the detect installion it will must work for both systems.. i only try in 64bits. Help me with that Razor please :P

Quote:
function GetUninstallerPath: string;
var
RegKey: string;
begin
Result := '';
RegKey := 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVer sion\Uninstall\' + ExpandConstant('{#AppName}') + '_is1'
if not RegQueryStringValue(HKLM, RegKey, 'UninstallString', Result) then
RegQueryStringValue(HKEY_CURRENT_USER, RegKey, 'UninstallString', Result);
StringChange(Result,'"','');
StringChange(Result,' /Silent','');
end;

function InitializeSetup:boolean;
var
UninstPath: string;
ResultCode: Integer;
begin
UninstPath := RemoveQuotes(GetUninstallerPath);
if UninstPath <> '' then begin
case ShowMyPreviusInstall of
mrRepair:Result:=True;
mrUninstall:
begin
Result:=False;
if not Exec(UninstPath, '/Silent', '', SW_HIDE, ewNoWait, ResultCode) then
MsgBox(FmtMessage(SetupMessage(msgUninstallOpenErr or), [UninstPath]), mbError, MB_OK);
end;
else
Result := False;
end;
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then
if iswin64 then
RegWriteStringValue(HKLM,'SOFTWARE\Wow6432Node\Mic rosoft\Windows\CurrentVersion\Uninstall\' + '{#AppName}' + '_is1','UninstallString','"'+ExpandConstant('{unin stallexe}')+'" /Silent')
else
RegWriteStringValue(HKCU,'Software\Microsoft\Windo ws\CurrentVersion\Uninstall\' + '{#AppName}' + '_is1','UninstallString','"'+ExpandConstant('{unin stallexe}')+'" /Silent');
end;

Last edited by Logrim; 16-11-2014 at 05:47.
Reply With Quote