Răsfoiți Sursa

Updated for OS requirements change.

Martijn Laan 6 ani în urmă
părinte
comite
ec118e41b0

+ 2 - 2
Examples/CodeClasses.iss

@@ -93,10 +93,10 @@ begin
   { TaskDialogMsgBox isn't a class but showing it anyway since it fits with the theme }
 
   case TaskDialogMsgBox('Choose A or B',
-                        'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',   
+                        'You can choose A or B.',   
                         mbInformation,
                         MB_YESNOCANCEL, ['I choose A'#13#10'A will be chosen.', 'I choose B'#13#10'B will be chosen.'],
-                        IDYES, False) of
+                        IDYES) of
     IDYES: MsgBox('You chose A.', mbInformation, MB_OK);
     IDNO: MsgBox('You chose B.', mbInformation, MB_OK);
   end;

+ 2 - 8
Files/Default.isl

@@ -66,10 +66,8 @@ UninstallAppRunningError=Uninstall has detected that %1 is currently running.%n%
 
 ; *** Startup questions
 PrivilegesRequiredOverrideInstruction=Choose install mode
-PrivilegesRequiredOverrideTaskDialogText1=%1 can be installed for all users (requires administrative privileges), or for you only.
-PrivilegesRequiredOverrideMsgBoxText1=%1 can be installed for all users (recommended, but requires administrative privileges), or for you only.%n%nInstall for all users?
-PrivilegesRequiredOverrideTaskDialogText2=%1 can be installed for you only, or for all users (requires administrative privileges).
-PrivilegesRequiredOverrideMsgBoxText2=%1 can be installed for you only (recommended), or for all users (requires administrative privileges).%n%nInstall for you only?
+PrivilegesRequiredOverrideDialogText1=%1 can be installed for all users (requires administrative privileges), or for you only.
+PrivilegesRequiredOverrideDialogText2=%1 can be installed for you only, or for all users (requires administrative privileges).
 PrivilegesRequiredOverrideAllUsers=Install for all users
 PrivilegesRequiredOverrideAllUsersRecommended=Install for all users (recommended)
 PrivilegesRequiredOverrideCurrentUser=Install for me only
@@ -249,7 +247,6 @@ SelectDirectoryLabel=Please specify the location of the next disk.
 
 ; *** Installation phase messages
 SetupAborted=Setup was not completed.%n%nPlease correct the problem and run Setup again.
-EntryAbortRetryIgnore=Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.
 AbortRetryIgnoreChooseAction=Choose action
 AbortRetryIgnoreRetry=Try again
 AbortRetryIgnoreProceedAnyway=Proceed anyway
@@ -284,14 +281,11 @@ ErrorRegWriteKey=Error writing to registry key:%n%1\%2
 ErrorIniEntry=Error creating INI entry in file "%1".
 
 ; *** File copying errors
-FileAbortRetryIgnore=Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation.
-FileAbortRetryIgnore2=Click Retry to try again, Ignore to proceed anyway (not recommended), or Abort to cancel installation.
 FileAbortRetryIgnoreSkipNotRecommended=Skip this file (not recommended)
 FileAbortRetryIgnoreProceedAnywayNotRecommended=Proceed anyway (not recommended)
 SourceIsCorrupted=The source file is corrupted
 SourceDoesntExist=The source file "%1" does not exist
 ExistingFileReadOnly=The existing file is marked as read-only.
-ExistingFileReadOnlyAbortRetryIgnore=Click Retry to remove the read-only attribute and try again, Ignore to skip this file, or Abort to cancel installation.
 ExistingFileReadOnlyRetry=Remove the read-only attribute and try again
 ExistingFileReadOnlySkip=Skip this file
 ErrorReadingExistingDest=An error occurred while trying to read the existing file:

+ 2 - 8
Files/Languages/Dutch.isl

@@ -49,10 +49,8 @@ UninstallAppRunningError=Het verwijderprogramma heeft vastgesteld dat %1 op dit
 
 ; *** Startup questions
 PrivilegesRequiredOverrideInstruction=Kies installatie modus
-PrivilegesRequiredOverrideTaskDialogText1=%1 kan geïnstalleerd worden voor alle gebruikers (vereist aanmelding als een systeembeheerder), of voor u alleen.
-PrivilegesRequiredOverrideMsgBoxText1=%1 kan geïnstalleerd worden voor alle gebruikers (aanbevolen, maar vereist aanmelding als een systeembeheerder), of voor u alleen.%n%nWilt u voor alle gebruikers installeren?
-PrivilegesRequiredOverrideTaskDialogText2=%1 kan geïnstalleerd worden voor u alleen, of voor alle gebruikers (vereist aanmelding als een systeembeheerder).
-PrivilegesRequiredOverrideMsgBoxText2=%1 kan geïnstalleerd worden voor u alleen (aanbevolen), of voor alle gebruikers (vereist aanmelding als een systeembeheerder).%n%nWilt u voor u alleen installeren?
+PrivilegesRequiredOverrideDialogText1=%1 kan geïnstalleerd worden voor alle gebruikers (vereist aanmelding als een systeembeheerder), of voor u alleen.
+PrivilegesRequiredOverrideDialogText2=%1 kan geïnstalleerd worden voor u alleen, of voor alle gebruikers (vereist aanmelding als een systeembeheerder).
 PrivilegesRequiredOverrideAllUsers=Installeer voor alle gebruikers
 PrivilegesRequiredOverrideAllUsersRecommended=Installeer voor alle gebruikers (aanbevolen)
 PrivilegesRequiredOverrideCurrentUser=Installeer voor mij alleen
@@ -229,7 +227,6 @@ SelectDirectoryLabel=Geef de locatie van de volgende diskette.
 
 ; *** Installation phase messages
 SetupAborted=Setup is niet voltooid.%n%nCorrigeer het probleem en voer Setup opnieuw uit.
-EntryAbortRetryIgnore=Klik op Opnieuw om het opnieuw te proberen, op Negeren om toch door te gaan, of op Afbreken om de installatie af te breken.
 AbortRetryIgnoreChooseAction=Kies actie
 AbortRetryIgnoreRetry=Probeer opnieuw
 AbortRetryIgnoreProceedAnyway=Ga toch door
@@ -264,14 +261,11 @@ ErrorRegWriteKey=Fout bij het schrijven naar registersleutel:%n%1\%2
 ErrorIniEntry=Fout bij het maken van een INI-instelling in bestand "%1".
 
 ; *** File copying errors
-FileAbortRetryIgnore=Klik op Opnieuw om het opnieuw te proberen, op Negeren om dit bestand over te slaan (niet aanbevolen), of op Afbreken om de installatie af te breken.
-FileAbortRetryIgnore2=Klik op Opnieuw om het opnieuw te proberen, op Negeren om toch door te gaan (niet aanbevolen), of op Afbreken om de installatie af te breken.
 FileAbortRetryIgnoreSkipNotRecommended=Sla dit bestand over (niet aanbevolen)
 FileAbortRetryIgnoreProceedAnywayNotRecommended=Ga toch door (niet aanbevolen)
 SourceIsCorrupted=Het bronbestand is beschadigd
 SourceDoesntExist=Het bronbestand "%1" bestaat niet
 ExistingFileReadOnly=Het bestaande bestand is gemarkeerd als alleen-lezen.
-ExistingFileReadOnlyAbortRetryIgnore=Klik op Opnieuw om het kenmerk alleen-lezen te verwijderen en opnieuw te proberen, op Negeren om dit bestand over te slaan, of op Afbreken om de installatie af te breken.
 ExistingFileReadOnlyRetry=Verwijder de alleen-lezen markering en probeer opnieuw
 ExistingFileReadOnlySkip=Sla dit bestand over
 ErrorReadingExistingDest=Er is een fout opgetreden bij het lezen van het bestaande bestand:

+ 7 - 13
ISHelp/isxfunc.xml

@@ -2358,20 +2358,14 @@ end;</pre></example>
       </function>
       <function>
         <name>TaskDialogMsgBox</name>
-        <prototype>function TaskDialogMsgBox(const Instruction, TaskDialogText, MsgBoxText: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const ForceMsgBox: Boolean): Integer;</prototype>
-        <description><p>Displays a task dialog if supported by the system and <tt>ForceMsgBox</tt> is set to <tt>False</tt>. Otherwise, displays a regular message box.</p>
-<p>If a task dialog is displayed:<br />
+        <prototype>function TaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer): Integer;</prototype>
+        <description><p>Displays a message box using a task dialog:<br />
 <tt>Instruction</tt> specifies the instruction to display.<br />
-<tt>TaskDialogText</tt> specifies the message to display.<br />
+<tt>Text</tt> specifies the message to display.<br />
 <tt>Typ</tt> specifies which icon to display in the task dialog. If set to <tt>mbConfirmation</tt>, no icon will be displayed.<br />
 <tt>Buttons</tt> specifies which buttons to include in the task dialog.<br />
 <tt>ButtonLabels</tt> specifies which custom button labels to use. If set to an empty array, the system's default button labels will be used. If a label consists of two strings separated by a newline, then the first string specifies the button label and the second string specifies the button note.<br />
 <tt>ShieldButton</tt> specifies which button to display a shield icon on. If set to 0, no shield icon will be displayed.</p>
-<p>If a a regular message box is displayed:<br/>
-<tt>Instruction</tt> specifies the caption to display. If set to an empty string, the default caption will be displayed.<br />
-<tt>MsgBoxText</tt> specifies the message to display.<br />
-<tt>Typ</tt> specifies which icon to display in the message box.<br />
-<tt>Buttons</tt> specifies which buttons to include in the message box.</p>
 <p>Returns an ID* constant indicating the button the user clicked, or 0 if the function fails (which shouldn't happen unless an invalid parameter is specified or system resources are exhausted).</p></description>
         <remarks><p>TMsgBoxType is defined as:</p>
 <p><tt>TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);</tt></p>
@@ -2382,10 +2376,10 @@ end;</pre></example>
 <p><tt>IDOK, IDCANCEL, IDRETRY, IDYES, IDNO, IDABORT, IDIGNORE</tt></p></remarks>
         <example><pre>begin
   case TaskDialogMsgBox('Choose A or B',
-                        'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',   
+                        'You can choose A or B.',   
                         mbInformation,
                         MB_YESNOCANCEL, ['I choose A'#13#10'A will be chosen.', 'I choose B'#13#10'B will be chosen.'],
-                        IDYES, False) of
+                        IDYES) of
     IDYES: MsgBox('You chose A.', mbInformation, MB_OK);
     IDNO: MsgBox('You chose B.', mbInformation, MB_OK);
   end;
@@ -2395,8 +2389,8 @@ end;</pre></example>
       </function>
       <function>
         <name>SuppressibleTaskDialogMsgBox</name>
-        <prototype>function SuppressibleTaskDialogMsgBox(const Instruction, TaskDialogText, MsgBoxText: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const ForceMsgBox: Boolean; const Default: Integer): Integer;</prototype>
-        <description><p>Displays a suppressible task dialog. If message boxes are being suppressed (see <link topic="setupcmdline" window="main">Setup Command Line Parameters</link>), <tt>Default</tt> is returned. Otherwise, SuppressibleTaskDialogMsgBox acts the same as the regular <link topic="isxfunc_TaskDialogMsgBox">TaskDialogMsgBox</link>.</p></description>
+        <prototype>function SuppressibleTaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const Default: Integer): Integer;</prototype>
+        <description><p>Displays a suppressible message box using a task dialog. If message boxes are being suppressed (see <link topic="setupcmdline" window="main">Setup Command Line Parameters</link>), <tt>Default</tt> is returned. Otherwise, SuppressibleTaskDialogMsgBox acts the same as the regular <link topic="isxfunc_TaskDialogMsgBox">TaskDialogMsgBox</link>.</p></description>
       </function>
       <function>
         <name>GetOpenFileName</name>

+ 13 - 15
Projects/Install.pas

@@ -196,16 +196,14 @@ begin
   ProcessEvents;
 end;
 
-function AbortRetryIgnoreTaskDialogMsgBox(const Text1, MsgBoxText2: String;
+function AbortRetryIgnoreTaskDialogMsgBox(const Text: String;
   const RetryIgnoreAbortButtonLabels: array of String): Boolean;
 { Returns True if Ignore was selected, False if Retry was selected, or
   calls Abort if Abort was selected. }
 begin
   Result := False;
-  case LoggedTaskDialogMsgBox('', SetupMessages[msgAbortRetryIgnoreChooseAction], Text1,
-         Text1 + SNewLine2 + MsgBoxText2, '', mbError, MB_ABORTRETRYIGNORE,
-         RetryIgnoreAbortButtonLabels,
-         0, False, True, IDABORT) of
+  case LoggedTaskDialogMsgBox('', SetupMessages[msgAbortRetryIgnoreChooseAction], Text, '',
+         mbError, MB_ABORTRETRYIGNORE, RetryIgnoreAbortButtonLabels, 0, True, IDABORT) of
     IDABORT: Abort;
     IDRETRY: ;
     IDIGNORE: Result := True;
@@ -935,7 +933,7 @@ var
             Break;
           end;
         until AbortRetryIgnoreTaskDialogMsgBox(
-                AddPeriod(FmtSetupMessage1(msgErrorFunctionFailedNoCode, 'AddFontResource')), SetupMessages[msgEntryAbortRetryIgnore],
+                AddPeriod(FmtSetupMessage1(msgErrorFunctionFailedNoCode, 'AddFontResource')),
                 [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgAbortRetryIgnoreProceedAnyway], SetupMessages[msgAbortRetryIgnoreCancel]]);
       end;
     end;
@@ -1316,7 +1314,7 @@ var
                (ExistingFileAttr and FILE_ATTRIBUTE_READONLY <> 0) then begin
               if not(foOverwriteReadOnly in CurFile^.Options) and
                  AbortRetryIgnoreTaskDialogMsgBox(
-                   DestFile + SNewLine2 + SetupMessages[msgExistingFileReadOnly], SetupMessages[msgExistingFileReadOnlyAbortRetryIgnore],
+                   DestFile + SNewLine2 + SetupMessages[msgExistingFileReadOnly],
                    [SetupMessages[msgExistingFileReadOnlyRetry], SetupMessages[msgExistingFileReadOnlySkip], SetupMessages[msgAbortRetryIgnoreCancel]]) then begin
                 Log('User opted not to strip the existing file''s read-only attribute. Skipping.');
                 goto Skip;
@@ -1653,7 +1651,7 @@ var
       if LastOperation <> '' then
         LastOperation := LastOperation + SNewLine;
       if not AbortRetryIgnoreTaskDialogMsgBox(
-               DestFile + SNewLine2 + LastOperation + Failed, SetupMessages[msgFileAbortRetryIgnore],
+               DestFile + SNewLine2 + LastOperation + Failed,
                [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgFileAbortRetryIgnoreSkipNotRecommended], SetupMessages[msgAbortRetryIgnoreCancel]]) then begin
         if ProgressUpdated then
           SetProgress(PreviousProgress);
@@ -1826,7 +1824,7 @@ var
             until FoundFiles or
                   (foSkipIfSourceDoesntExist in CurFile^.Options) or
                   AbortRetryIgnoreTaskDialogMsgBox(
-                    SetupMessages[msgErrorReadingSource] + SNewLine + AddPeriod(FmtSetupMessage(msgSourceDoesntExist, [SourceWildcard])), SetupMessages[msgFileAbortRetryIgnore],
+                    SetupMessages[msgErrorReadingSource] + SNewLine + AddPeriod(FmtSetupMessage(msgSourceDoesntExist, [SourceWildcard])),
                     [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgFileAbortRetryIgnoreSkipNotRecommended], SetupMessages[msgAbortRetryIgnoreCancel]]);
             { In case we didn't end up copying all the expected bytes, bump
               the progress bar up to the expected amount }
@@ -2123,7 +2121,7 @@ var
                   Break;
                 except
                   if AbortRetryIgnoreTaskDialogMsgBox(
-                       GetExceptMessage, SetupMessages[msgEntryAbortRetryIgnore],
+                       GetExceptMessage,
                        [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgAbortRetryIgnoreProceedAnyway], SetupMessages[msgAbortRetryIgnoreCancel]]) then begin
                     Skip := True;
                     Break;
@@ -2139,7 +2137,7 @@ var
                   Break;
                 end;
                until AbortRetryIgnoreTaskDialogMsgBox(
-                       FmtSetupMessage1(msgErrorIniEntry, IniFilename), SetupMessages[msgEntryAbortRetryIgnore],
+                       FmtSetupMessage1(msgErrorIniEntry, IniFilename),
                        [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgAbortRetryIgnoreProceedAnyway], SetupMessages[msgAbortRetryIgnoreCancel]]);
           end else
             Log('Skipping updating the .INI file, only updating uninstall log.');
@@ -2419,7 +2417,7 @@ var
               end;
             except
               if not AbortRetryIgnoreTaskDialogMsgBox(
-                       GetExceptMessage, SetupMessages[msgEntryAbortRetryIgnore],
+                       GetExceptMessage,
                        [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgAbortRetryIgnoreProceedAnyway], SetupMessages[msgAbortRetryIgnoreCancel]]) then begin
                 Log('Retrying.');
                 NeedToRetry := True;
@@ -2618,7 +2616,7 @@ var
           Log('Registration failed:' + SNewLine + GetExceptMessage);
           if not NoErrorMessages then
             if not AbortRetryIgnoreTaskDialogMsgBox(
-                     Filename + SNewLine2 + FmtSetupMessage1(msgErrorRegisterServer, GetExceptMessage), SetupMessages[msgFileAbortRetryIgnore2],
+                     Filename + SNewLine2 + FmtSetupMessage1(msgErrorRegisterServer, GetExceptMessage),
                      [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgFileAbortRetryIgnoreProceedAnywayNotRecommended], SetupMessages[msgAbortRetryIgnoreCancel]]) then
               NeedToRetry := True;
         end;
@@ -2646,7 +2644,7 @@ var
           Log('Registration failed:' + SNewLine + GetExceptMessage);
           if not NoErrorMessages then
             if not AbortRetryIgnoreTaskDialogMsgBox(
-                     Filename + SNewLine2 + FmtSetupMessage1(msgErrorRegisterTypeLib, GetExceptMessage), SetupMessages[msgFileAbortRetryIgnore2],
+                     Filename + SNewLine2 + FmtSetupMessage1(msgErrorRegisterTypeLib, GetExceptMessage),
                      [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgFileAbortRetryIgnoreProceedAnywayNotRecommended], SetupMessages[msgAbortRetryIgnoreCancel]]) then
               NeedToRetry := True;
         end;
@@ -2995,7 +2993,7 @@ var
     while Error = ERROR_FAIL_SHUTDOWN do begin
       Log('Some applications could not be shut down.');
       if AbortRetryIgnoreTaskDialogMsgBox(
-           SetupMessages[msgErrorCloseApplications], SetupMessages[msgEntryAbortRetryIgnore],
+           SetupMessages[msgErrorCloseApplications],
            [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgAbortRetryIgnoreProceedAnyway], SetupMessages[msgAbortRetryIgnoreCancel]]) then
         Break;
       Log('Retrying to shut down applications using our files.' + ForcedStrings[Forced]);

+ 12 - 14
Projects/Main.pas

@@ -221,9 +221,9 @@ function LoggedAppMessageBox(const Text, Caption: PChar; const Flags: Longint;
   const Suppressible: Boolean; const Default: Integer): Integer;
 function LoggedMsgBox(const Text, Caption: String; const Typ: TMsgBoxType;
   const Buttons: Cardinal; const Suppressible: Boolean; const Default: Integer): Integer;
-function LoggedTaskDialogMsgBox(const Icon, Instruction, TaskDialogText, MsgBoxText, Caption: String;
+function LoggedTaskDialogMsgBox(const Icon, Instruction, Text, Caption: String;
   const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String;
-  const ShieldButton: Integer; const ForceMsgBox: Boolean; const Suppressible: Boolean; const Default: Integer): Integer;
+  const ShieldButton: Integer; const Suppressible: Boolean; const Default: Integer): Integer;
 procedure LogWindowsVersion;
 procedure NotifyAfterInstallEntry(const AfterInstall: String);
 procedure NotifyAfterInstallFileEntry(const FileEntry: PSetupFileEntry);
@@ -2378,17 +2378,17 @@ begin
   end;
 end;
 
-function LoggedTaskDialogMsgBox(const Icon, Instruction, TaskDialogText, MsgBoxText, Caption: String;
+function LoggedTaskDialogMsgBox(const Icon, Instruction, Text, Caption: String;
   const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String;
-  const ShieldButton: Integer; const ForceMsgBox: Boolean; const Suppressible: Boolean; const Default: Integer): Integer;
+  const ShieldButton: Integer; const Suppressible: Boolean; const Default: Integer): Integer;
 begin
   if InitSuppressMsgBoxes and Suppressible then begin
-    LogSuppressedMessageBox(PChar(TaskDialogText), Buttons, Default);
+    LogSuppressedMessageBox(PChar(Text), Buttons, Default);
     Result := Default;
   end else begin
-    LogMessageBox(PChar(TaskDialogText), Buttons);
-    Result := TaskDialogMsgBox(Icon, Instruction, TaskDialogText, MsgBoxText,
-      Caption, Typ, Buttons, ButtonLabels, ShieldButton, ForceMsgBox);
+    LogMessageBox(PChar(Text), Buttons);
+    Result := TaskDialogMsgBox(Icon, Instruction, Text,
+      Caption, Typ, Buttons, ButtonLabels, ShieldButton);
     if Result <> 0 then
       LogFmt('User chose %s.', [GetMessageBoxResultText(Result)])
     else
@@ -2835,20 +2835,18 @@ var
           AppName := SetupHeader.AppName;
         if SetupHeader.PrivilegesRequired = prLowest then begin
           case TaskDialogMsgBox('MAINICON', SetupMessages[msgPrivilegesRequiredOverrideInstruction],
-                 FmtSetupMessage(msgPrivilegesRequiredOverrideTaskDialogText2, [AppName]),
-                 FmtSetupMessage(msgPrivilegesRequiredOverrideMsgBoxText2, [AppName]),
+                 FmtSetupMessage(msgPrivilegesRequiredOverrideDialogText2, [AppName]),
                  SetupMessages[msgSetupAppTitle], mbInformation, MB_YESNOCANCEL,
-                 [SetupMessages[msgPrivilegesRequiredOverrideCurrentUserRecommended], SetupMessages[msgPrivilegesRequiredOverrideAllUsers]], IDNO, False) of
+                 [SetupMessages[msgPrivilegesRequiredOverrideCurrentUserRecommended], SetupMessages[msgPrivilegesRequiredOverrideAllUsers]], IDNO) of
             IDYES: DesireAdminInstallMode := False;
             IDNO: DesireAdminInstallMode := True;
             IDCANCEL: Abort;
             end;
         end else begin
           case TaskDialogMsgBox('MAINICON', SetupMessages[msgPrivilegesRequiredOverrideInstruction],
-                 FmtSetupMessage(msgPrivilegesRequiredOverrideTaskDialogText1, [AppName]),
-                 FmtSetupMessage(msgPrivilegesRequiredOverrideMsgBoxText1, [AppName]),
+                 FmtSetupMessage(msgPrivilegesRequiredOverrideDialogText1, [AppName]),
                  SetupMessages[msgSetupAppTitle], mbInformation, MB_YESNOCANCEL,
-                 [SetupMessages[msgPrivilegesRequiredOverrideAllUsersRecommended], SetupMessages[msgPrivilegesRequiredOverrideCurrentUser]], IDYES, False) of
+                 [SetupMessages[msgPrivilegesRequiredOverrideAllUsersRecommended], SetupMessages[msgPrivilegesRequiredOverrideCurrentUser]], IDYES) of
             IDYES: DesireAdminInstallMode := True;
             IDNO: DesireAdminInstallMode := False;
             IDCANCEL: Abort;

+ 2 - 8
Projects/MsgIDs.pas

@@ -70,7 +70,6 @@ type
     msgDiskSpaceWarning,
     msgDiskSpaceWarningTitle,
     msgDontCloseApplications,
-    msgEntryAbortRetryIgnore,
     msgErrorChangingAttr,
     msgErrorCloseApplications,
     msgErrorCopying,
@@ -99,13 +98,10 @@ type
     msgErrorTooManyFilesInDir,
     msgExistingFileNewer,
     msgExistingFileReadOnly,
-    msgExistingFileReadOnlyAbortRetryIgnore,
     msgExistingFileReadOnlyRetry,
     msgExistingFileReadOnlySkip,
     msgExitSetupMessage,
     msgExitSetupTitle,
-    msgFileAbortRetryIgnore,
-    msgFileAbortRetryIgnore2,
     msgFileAbortRetryIgnoreSkipNotRecommended,
     msgFileAbortRetryIgnoreProceedAnywayNotRecommended,
     msgFileExists,
@@ -156,10 +152,8 @@ type
     msgPreparingDesc,
     msgPreviousInstallNotCompleted,
     msgPrivilegesRequiredOverrideInstruction,
-    msgPrivilegesRequiredOverrideTaskDialogText1,
-    msgPrivilegesRequiredOverrideMsgBoxText1,
-    msgPrivilegesRequiredOverrideTaskDialogText2,
-    msgPrivilegesRequiredOverrideMsgBoxText2,
+    msgPrivilegesRequiredOverrideDialogText1,
+    msgPrivilegesRequiredOverrideDialogText2,
     msgPrivilegesRequiredOverrideAllUsers,
     msgPrivilegesRequiredOverrideAllUsersRecommended,
     msgPrivilegesRequiredOverrideCurrentUser,

+ 2 - 2
Projects/ScriptFunc.pas

@@ -197,8 +197,8 @@ const
     'function GetWindowsVersionString: String;',
     'function MsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons: Integer): Integer;',
     'function SuppressibleMsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons, Default: Integer): Integer;',
-    'function TaskDialogMsgBox(const Instruction, TaskDialogText, MsgBoxText: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const ForceMsgBox: Boolean): Integer;',
-    'function SuppressibleTaskDialogMsgBox(const Instruction, TaskDialogText, MsgBoxText: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const ForceMsgBox: Boolean;'+'const Default: Integer): Integer;',
+    'function TaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer): Integer;',
+    'function SuppressibleTaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer;'+' const Default: Integer): Integer;',
     'function IsWin64: Boolean;',
     'function Is64BitInstallMode: Boolean;',
     'function ProcessorArchitecture: TSetupProcessorArchitecture;',

+ 3 - 3
Projects/ScriptFunc_R.pas

@@ -1039,14 +1039,14 @@ begin
       Default := 0;
     end else begin
       Suppressible := True;
-      Default := Stack.GetInt(PStart-9);
+      Default := Stack.GetInt(PStart-7);
     end;
-    Arr := NewTPSVariantIFC(Stack[PStart-6], True);
+    Arr := NewTPSVariantIFC(Stack[PStart-5], True);
     N := PSDynArrayGetLength(Pointer(Arr.Dta^), Arr.aType);
     SetLength(ButtonLabels, N);
     for I := 0 to N-1 do
       ButtonLabels[I] := VNGetString(PSGetArrayField(Arr, I));
-    Stack.SetInt(PStart, LoggedTaskDialogMsgBox('', Stack.GetString(PStart-1), Stack.GetString(PStart-2), Stack.GetString(PStart-3), GetMsgBoxCaption, TMsgBoxType(Stack.GetInt(PStart-4)), Stack.GetInt(PStart-5), ButtonLabels, Stack.GetInt(PStart-7), Stack.GetBool(PStart-8), Suppressible, Default));
+    Stack.SetInt(PStart, LoggedTaskDialogMsgBox('', Stack.GetString(PStart-1), Stack.GetString(PStart-2), GetMsgBoxCaption, TMsgBoxType(Stack.GetInt(PStart-3)), Stack.GetInt(PStart-4), ButtonLabels, Stack.GetInt(PStart-6), Suppressible, Default));
   end else if Proc.Name = 'ISWIN64' then begin
     Stack.SetBool(PStart, IsWin64);
   end else if Proc.Name = 'IS64BITINSTALLMODE' then begin

+ 4 - 6
Projects/TaskDialog.pas

@@ -14,7 +14,7 @@ interface
 uses
   CmnFunc;
 
-function TaskDialogMsgBox(const Icon, Instruction, TaskDialogText, MsgBoxText, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer; const ForceMsgBox: Boolean): Integer;
+function TaskDialogMsgBox(const Icon, Instruction, Text, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer): Integer;
 
 implementation
 
@@ -33,7 +33,6 @@ begin
   Result := S_OK;
 end;
 
-
 function DoTaskDialog(const hWnd: HWND; const Instruction, Text, Caption, Icon: PWideChar; const CommonButtons: Cardinal; const ButtonLabels: array of String; const ButtonIDs: array of Integer; const ShieldButton: Integer; const RightToLeft: Boolean; const TriggerMessageBoxCallbackFuncFlags: LongInt; var ModalResult: Integer): Boolean;
 var
   Config: TTaskDialogConfig;
@@ -102,7 +101,7 @@ begin
     Result := False;
 end;
 
-function TaskDialogMsgBox(const Icon, Instruction, TaskDialogText, MsgBoxText, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer; const ForceMsgBox: Boolean): Integer;
+function TaskDialogMsgBox(const Icon, Instruction, Text, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer): Integer;
 var
   IconP: PChar;
   TDCommonButtons: Cardinal;
@@ -170,11 +169,10 @@ begin
   end;
   if Length(ButtonIDs) <> NButtonLabelsAvailable then
     InternalError('TaskDialogMsgBox: Invalid ButtonLabels');
-  if ForceMsgBox or
-     not DoTaskDialog(Application.Handle, PChar(Instruction), PChar(TaskDialogText),
+  if not DoTaskDialog(Application.Handle, PChar(Instruction), PChar(Text),
            GetMessageBoxCaption(PChar(Caption), Typ), IconP, TDCommonButtons, ButtonLabels, ButtonIDs, ShieldButton,
            GetMessageBoxRightToLeft, IfThen(Typ in [mbError, mbCriticalError], MB_ICONSTOP, 0), Result) then //note that MB_ICONEXCLAMATION (used by mbError) includes MB_ICONSTOP (used by mbCriticalError)
-    Result := MsgBox(MsgBoxText, IfThen(Instruction <> '', Instruction, Caption), Typ, Buttons);
+    Result := 0;
 end;
 
 procedure InitCommonControls; external comctl32 name 'InitCommonControls';

+ 4 - 4
whatsnew.htm

@@ -114,7 +114,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Added support for 64-bit mode on Windows 10 on ARM which can be used to install ARM64 binaries. See the <i>64BitThreeArch.iss</i> example script for an example which demonstrates how to install a program built for three different architectures (x86, x64, ARM64) using a single installer.</li>
 </ul>
 <ul>
-  <li>The Abort/Retry/Ignore dialogs shown by Setup now display a task dialog if supported by the system and the existing regular message box otherwise. The task dialog is much more user friendly (example: <a href="https://i.imgur.com/IwOfoQo.png">task dialog</a> versus <a href="https://i.imgur.com/n7wh2UC.png">message box</a>).</li>
+  <li>The Abort/Retry/Ignore dialogs shown by Setup now display task dialogs. These task dialogs are much more user friendly than the message boxes previously used (example: <a href="https://i.imgur.com/IwOfoQo.png">task dialog</a> versus <a href="https://i.imgur.com/n7wh2UC.png">message box</a>).</li>
   <li>Added new [Setup] section directive: <tt>VersionInfoOriginalFileName</tt>, which sets the original filename version value.</li>
   <li>The <tt>Permissions</tt> parameter supported by [Files], [Dirs] and [Registry] entries now also allows you to grant permission to the Guests group, the Local Service account, the Network Service account, and to the Creator Owner.</li>
   <li>Added new special-purpose <i>HelpTextNote</i> message that can be used to specify one or more lines of text that are added to the list of parameters in the summary shown when passing /HELP on the command line. This message defaults to an empty string so make sure to provide a non-empty default for all languages from your main script if you want to use it.</li>
@@ -125,7 +125,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Pascal Scripting changes:
   <ul>
     <li>Using event attributes it is now possible to have multiple implementations of the same event function in your script. This is especially useful in included scripts implementing an event function to avoid conflicts with the main script. See the help file for more information and the <i>CodeExample1.iss</i> example script for an example.</li>
-    <li>Added new <tt>TaskDialogMsgBox</tt> and <tt>SuppressibleTaskDialogMsgBox</tt> support functions which display a task dialog if supported by the system and a regular message box otherwise (<a href="https://i.imgur.com/hU4RQP2.png">example</a>). See the help file for more information and the <i>CodeClasses.iss</i> example script for an example.</li>
+    <li>Added new <tt>TaskDialogMsgBox</tt> and <tt>SuppressibleTaskDialogMsgBox</tt> support functions which display a message box using a task dialog (<a href="https://i.imgur.com/hU4RQP2.png">example</a>). See the help file for more information and the <i>CodeClasses.iss</i> example script for an example.</li>
     <li>Added new <tt>CreateCallback</tt> support function which allows you to perform direct callbacks from DLL functions (like Windows API functions) to functions in your script. See the help file and the <i>CodeDll.iss</i> example script for an example.</li>
     <li>[Setup] section directives <tt>ChangesAssociations</tt> and <tt>ChangesEnvironment</tt> may now be set to a boolean expression, which may contain calls to check functions.</li>
     <li>Added new <tt>BevelKind</tt> property to the <tt>TPanel</tt> support class and new <tt>BevelKind</tt> and <tt>BorderStyle</tt> properties to the <tt>TRichEditViewer</tt> support class, allowing you to enable a flatter interface for a more modern look. See the <i>CodeClasses.iss</i> example script for an example.</li>
@@ -156,9 +156,9 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 
 <p>Some messages have been added and changed in this version:<!-- (<a href="https://github.com/jrsoftware/issrc/commit/b0cd1a0177b818e36734026c67dc24f01ad6a0d0">View differences in Default.isl</a>).--></p>
 <ul>
-  <li><b>New messages:</b> AbortRetryIgnoreChooseAction, AbortRetryIgnoreRetry, AbortRetryIgnoreProceedAnyway, AbortRetryIgnoreCancel, ExistingFileReadOnlyAbortRetryIgnore, ExistingFileReadOnlyRetry, ExistingFileReadOnlySkip, FileAbortRetryIgnoreProceedAnywayNotRecommended, FileAbortRetryIgnoreSkipNotRecommended, MissingWOW64APIs2, PrivilegesRequiredOverrideInstruction, PrivilegesRequiredOverrideTaskDialogText1, PrivilegesRequiredOverrideMsgBoxText1, PrivilegesRequiredOverrideTaskDialogText2, PrivilegesRequiredOverrideMsgBoxText2, PrivilegesRequiredOverrideAllUsers, PrivilegesRequiredOverrideAllUsersRecommended, PrivilegesRequiredOverrideCurrentUser, PrivilegesRequiredOverrideCurrentUserRecommended, UninstallDisplayNameMark, UninstallDisplayNameMarks, UninstallDisplayNameMark32Bit, UninstallDisplayNameMark64Bit, UninstallDisplayNameMarkAllUsers, UninstallDisplayNameCurrentUser.</li>
+  <li><b>New messages:</b> AbortRetryIgnoreChooseAction, AbortRetryIgnoreRetry, AbortRetryIgnoreProceedAnyway, AbortRetryIgnoreCancel, ExistingFileReadOnlyAbortRetryIgnore, ExistingFileReadOnlyRetry, ExistingFileReadOnlySkip, FileAbortRetryIgnoreProceedAnywayNotRecommended, FileAbortRetryIgnoreSkipNotRecommended, MissingWOW64APIs2, PrivilegesRequiredOverrideInstruction, PrivilegesRequiredOverrideDialogText1, PrivilegesRequiredOverrideDialogText2, PrivilegesRequiredOverrideAllUsers, PrivilegesRequiredOverrideAllUsersRecommended, PrivilegesRequiredOverrideCurrentUser, PrivilegesRequiredOverrideCurrentUserRecommended, UninstallDisplayNameMark, UninstallDisplayNameMarks, UninstallDisplayNameMark32Bit, UninstallDisplayNameMark64Bit, UninstallDisplayNameMarkAllUsers, UninstallDisplayNameCurrentUser.</li>
   <li><b>Changed message:</b> ExistingFileReadOnly.</li>
-  <li><b>Removed message:</b> MissingWOW64APIs.</li>
+  <li><b>Removed message:</b> MissingWOW64APIs, EntryAbortRetryIgnore, ExistingFileReadOnlyAbortRetryIgnore, FileAbortRetryIgnore, FileAbortRetryIgnore2.</li>
 </ul>
 
 <p>Note: Only the official English and Dutch (Netherlands) translations have been updated for these changes at this moment. See the <a href="http://www.jrsoftware.org/files/istrans/">Inno Setup Translations</a> page for more information.</p>