Index: source/windows/Main.pas =================================================================== --- source/windows/Main.pas (revision 177) +++ source/windows/Main.pas (working copy) @@ -34,7 +34,7 @@ property ConfigFileDestination: WideString read FConfigFileDestination write FConfigFileDestination; property InnoDBLogFileSize: WideString read FInnoDBLogFileSize write FInnoDBLogFileSize; property InnoDBDataHomeDir: WideString read FInnoDBDataHomeDir write FInnoDBDataHomeDir; - property DataPath: WideString read FDataPath; + property DataPath: WideString read FDataPath write FDataPath; property CnfDataPath: WideString read FCnfDataPath write FCnfDataPath; property InstallationPath: WideString read FInstallationPath; property Port: Integer read FPort write FPort; @@ -386,9 +386,9 @@ FVersion := Version; FInstallationPath := IncludeTrailingPathDelimiter(InstallationPath); if (DataPath <> '') and (DataPath <> '\') then - FDataPath := IncludeTrailingPathDelimiter(DataPath) + FDataPath := IncludeTrailingPathDelimiter(DataPath) + IncludeTrailingPathDelimiter('Data') else //Backward compatibility - FDataPath := IncludeTrailingPathDelimiter(InstallationPath); + FDataPath := IncludeTrailingPathDelimiter(InstallationPath) + IncludeTrailingPathDelimiter('Data'); FServiceName := ServiceName; FConfigFileDestination := CnfFileDestination; FExistingDataDir := ExistingDataDir; @@ -827,19 +827,23 @@ NewPasswordPnl.Top := 80; // Check to make sure the datadir for this instance matches it's config file - T := Tnt_WideStringReplace(CurrentInstance.DataPath + 'Data' + PathDelim, '\', '/', [rfReplaceAll]); + T := Tnt_WideStringReplace(CurrentInstance.DataPath, '\', '/', [rfReplaceAll]); if ((not WideSameText(CurrentInstance.CnfDataPath, T)) and DirectoryExists(CurrentInstance.CnfDataPath)) then begin - MessageDlg('The defaults-file used by the service named ' + - CurrentInstance.ServiceName + ' contains the following option:' + #13#10 + - ' datadir="'+ CurrentInstance.CnfDataPath + '"' + #13#10#13#10 + - 'However, if this service is reconfigured with the Config Wizard at' + - ' this time the new defaults-file will contain the following option:' + - #13#10 + ' datadir="' + T + '"' + #13#10#13#10 + 'When started, ' + - 'this service will use the datadir specified by the new option. If this ' + - 'is a mistake, close the Wizard and either manually move your data ' + - 'directory to the new location or Modify the installation to point to ' + - 'the correct data path.', mtWarning, [mbOk], 0); + if InstanceFromCommandLineParams = True then // CommandLine param wins. + MessageDlg('The defaults-file used by the service named ' + + CurrentInstance.ServiceName + ' contains the following option:' + + #13#10 + ' datadir="'+ CurrentInstance.CnfDataPath + '"' + + #13#10#13#10 + 'However, if this service is reconfigured with the ' + + 'Config Wizard at this time the new defaults-file will contain the ' + + 'following option:' + #13#10 + ' datadir="' + T + '"' + + #13#10#13#10 + 'When started, this service will use the datadir ' + + 'specified by the new option. If this is a mistake, close the Wizard ' + + 'and either manually move your data directory to the new location or ' + + 'Modify the installation to point to the correct data path.', + mtWarning, [mbOk], 0) + else // CNF param wins. + CurrentInstance.DataPath := CurrentInstance.CnfDataPath; end; end; end; @@ -1736,7 +1740,7 @@ Vars.variables_num := Vars.variables_num + 1; Vars.names.Add('datadir'); - Vars.values.Add('"' + Tnt_WideStringReplace(CurrentInstance.DataPath + 'Data' + PathDelim, '\', '/', [rfReplaceAll]) + '"'); + Vars.values.Add('"' + Tnt_WideStringReplace(CurrentInstance.DataPath, '\', '/', [rfReplaceAll]) + '"'); Vars.variables_num := Vars.variables_num + 1; end else