Index: Main.pas =================================================================== --- Main.pas (revision 180) +++ Main.pas (working copy) @@ -25,11 +25,13 @@ FInnoDBLogFileSize: WideString; FInnoDBDataHomeDir: WideString; FExistingDataDir: Boolean; + FRegPath: WideString; public constructor Create(ProductName: WideString; Version: WideString; InstallationPath: WideString; DataPath: WideString; ExistingDataDir: Boolean; ServiceName: WideString = ''; CnfFileDestination: WideString = ''); + property RegPath: WideString read FRegPath write FRegPath; property ExistingDataDir: Boolean read FExistingDataDir write FExistingDataDir; property ConfigFileDestination: WideString read FConfigFileDestination write FConfigFileDestination; property InnoDBLogFileSize: WideString read FInnoDBLogFileSize write FInnoDBLogFileSize; @@ -1216,6 +1218,8 @@ ServerInstance := TServerInstance.Create(SubKeyNames[I], Version, Path, DataPath, UseExistingDataDir); InstanceList.Add(ServerInstance); end; + + ServerInstance.RegPath := ServiceReg.CurrentPath; except // Something is wrong with the reg-entries so continue with next service. Continue; @@ -2237,6 +2241,7 @@ var SuccessCaption: WideString; + ServiceReg: TTntRegistry; begin BackBtn.Enabled := False; @@ -2326,6 +2331,12 @@ Application.ProcessMessages; end; + // Set the 'FoundExistingDataDir' registry key. + ServiceReg := TTntRegistry.Create; + if ServiceReg.OpenKey(CurrentInstance.RegPath, False) then + ServiceReg.WriteString('FoundExistingDataDir', _('1')); + ServiceReg.CloseKey; + SuccessCaption := SuccessCaption+#13#10+ 'Press [Finish] to close the Wizard.';