diff --git a/source/helpers.pas b/source/helpers.pas index 5167840e..c4133910 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -255,6 +255,7 @@ type var MainReg: TRegistry; RegPath: String = '\Software\' + APPNAME + '\'; + PortableMode: Boolean = False; MutexHandle: THandle = 0; dbgCounter: Integer = 0; DecimalSeparatorSystemdefault: Char; @@ -3513,8 +3514,14 @@ begin Exit; // Open the right key - if StartupMode then + if StartupMode then begin RegPath := '\Software\' + APPNAME + ' Portable '+IntToStr(GetCurrentThreadId)+'\'; + PortableMode := True; + end else begin + // Do not work like a portable on exit, if at application start we didn't either + if not PortableMode then + Exit; + end; Screen.Cursor := crHourGlass; try diff --git a/source/main.pas b/source/main.pas index 93b79d69..3a3dd15f 100644 --- a/source/main.pas +++ b/source/main.pas @@ -8799,7 +8799,10 @@ begin Cap := Cap + ' /' + ActiveDatabase; if SelectedTable.Name <> '' then Cap := Cap + '/' + SelectedTable.Name; - Cap := Cap + ' - ' + APPNAME + ' ' + AppVersion; + Cap := Cap + ' - ' + APPNAME; + if PortableMode then + Cap := Cap + ' Portable'; + Cap := Cap + ' ' + AppVersion; Caption := Cap; Application.Title := Cap; end;