+
+
+function NextButtonClick(CurPage: Integer): Boolean;
+var
+ FileName: string;
+ ResultCode: Integer;
+begin
+ Result := True;
+ if CurPage <> wpSelectDir then Exit;
+ FileName := WizardDirValue() + '\wxPython\unins000.exe';
+ if FileExists(FileName) then begin
+ ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
+ 'is recommended that it be uninstalled first.' + #13#13 +
+ 'Should I do it?',
+ mbConfirmation, MB_YESNO);
+ if ResultCode = IDYES then begin
+ InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
+
+ end;
+ end;
+end;
+
+