diff --git a/tools/windows/tool_setup/idf_setup.iss.inc b/tools/windows/tool_setup/idf_setup.iss.inc index dfa044b8d..09d6871b5 100644 --- a/tools/windows/tool_setup/idf_setup.iss.inc +++ b/tools/windows/tool_setup/idf_setup.iss.inc @@ -302,7 +302,16 @@ begin Log('CheckWinDefenderAvailable: ' + szHasWD); - WizardForm.TasksList.ItemEnabled[1] := bHasWD; - WizardForm.TasksList.Checked[1] := bHasWD; + { WD registration checkbox is identified by 'Windows Defender' substring anywhere in its caption. + Please, keep this in mind when making changes } + for x:=0 to (WizardForm.TasksList.Items.Count-1) do + begin + if Pos('Windows Defender', WizardForm.TasksList.ItemCaption[x]) > 0 then + begin + WizardForm.TasksList.ItemEnabled[x] := bHasWD; + WizardForm.TasksList.Checked[x] := bHasWD; + break; + end; + end; end; end; diff --git a/tools/windows/tool_setup/idf_tool_setup.iss b/tools/windows/tool_setup/idf_tool_setup.iss index 8b01689c5..8e39f60ee 100644 --- a/tools/windows/tool_setup/idf_tool_setup.iss +++ b/tools/windows/tool_setup/idf_tool_setup.iss @@ -79,6 +79,8 @@ Type: files; Name: "{autodesktop}\{#IDFCmdExeShortcutFile}" [Tasks] Name: createlnk; Description: "Create Start Menu shortcut for the ESP-IDF Tools Command Prompt"; Name: createdsk; Description: "Create Desktop shortcut for the ESP-IDF Tools Command Prompt"; +; WD registration checkbox is identified by 'Windows Defender' substring anywhere in its caption, not by the position index in WizardForm.TasksList.Items +; Please, keep this in mind when making changes to the item's description - WD checkbox is to be disabled on systems without the Windows Defender installed Name: wdexcl; Description: "Register the ESP-IDF Tools executables as Windows Defender exclusions (improves compilation speed, requires elevation)"; [Run]