View Single Post
  #8  
Old 01-03-2009, 04:40
peterf1999's Avatar
peterf1999 peterf1999 is offline
Die Hard Member
 
Join Date: Nov 2008
Location: Italy
Posts: 928
Thanks: 14
Thanked 983 Times in 236 Posts
peterf1999 is on a distinguished road
Quote:
installer doesnt skip if regkey exists - always run
Code:
function InitializeSetup(): Boolean;

var
ResultCode: integer;

begin

if not RegKeyExists(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{81FF29CE-2D23-45FC-8BDE-7491A15F2B02}') then

   begin

     Exec (ExpandConstant('{src}\setup.exe'),'', '', SW_SHOW,
     ewWaitUntilTerminated, ResultCode)
     Result:=TRUE
     
   end else

       begin
       
        Exec (ExpandConstant('{src}\setup.exe'),'', '', SW_SHOW,
        ewWaitUntilTerminated, ResultCode)
// return false and abort inno setup, original setup.exe launched and it asks
// if u want to remove the game
       end;
InitializeSetup event does it :P

Code:
installer dont run nv_arc.exe if regkey exists :)
procedure CurStepChanged does it
look carefully the code

it's not a joke, i tested it and works 100%

Last edited by peterf1999; 02-03-2009 at 01:45.
Reply With Quote