From fbd2372eaa8edd6f6bb43317fa336b59871186bc Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Fri, 29 Sep 2023 23:18:18 +0100 Subject: [PATCH] fix: settings and store issue --- src/playbook/Executables/CONVERTUSERS.cmd | 4 ++-- src/playbook/Executables/ONED.cmd | 10 ++++++++-- src/sxsc/Atlas-NoTelemetry.yaml | 12 ++++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/playbook/Executables/CONVERTUSERS.cmd b/src/playbook/Executables/CONVERTUSERS.cmd index 595ca37fad..1405e9da27 100644 --- a/src/playbook/Executables/CONVERTUSERS.cmd +++ b/src/playbook/Executables/CONVERTUSERS.cmd @@ -2,7 +2,7 @@ setlocal EnableDelayedExpansion :: make passwords never expire -net accounts /maxpwage:unlimited +net accounts /maxpwage:unlimited > nul for /f "usebackq delims=" %%a in (`PowerShell -NoP -C "(Get-LocalUser | Where {$_.PrincipalSource -eq 'MicrosoftAccount'}).Name"`) do call :CONVERTUSER "%%a" for /f "usebackq delims=" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\IdentityStore\LogonCache\Name2Sid" ^| findstr /i /c:"Name2Sid"`) do reg delete "%%a" /f > nul 2>&1 @@ -30,4 +30,4 @@ net user "%~1" "" > nul wmic UserAccount where name='%~1' set Passwordexpires=true > nul net user "%~1" /logonpasswordchg:yes > nul -net accounts /lockoutthreshold:10 \ No newline at end of file +net accounts /lockoutthreshold:10 > nul \ No newline at end of file diff --git a/src/playbook/Executables/ONED.cmd b/src/playbook/Executables/ONED.cmd index 4be52b42d9..91327e38fc 100644 --- a/src/playbook/Executables/ONED.cmd +++ b/src/playbook/Executables/ONED.cmd @@ -2,8 +2,14 @@ setlocal EnableDelayedExpansion taskkill /f /im OneDrive*.exe > nul 2>&1 -"%windir%\System32\OneDriveSetup.exe" /uninstall -"%windir%\SysWOW64\OneDriveSetup.exe" /uninstall +for %%a in ( + "%windir%\System32\OneDriveSetup.exe" + "%windir%\SysWOW64\OneDriveSetup.exe" +) do ( + if exist "%%a" ( + "%%a" /uninstall + ) +) :: If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs don't have this key. for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( diff --git a/src/sxsc/Atlas-NoTelemetry.yaml b/src/sxsc/Atlas-NoTelemetry.yaml index df17ba37fb..95d6ebf185 100644 --- a/src/sxsc/Atlas-NoTelemetry.yaml +++ b/src/sxsc/Atlas-NoTelemetry.yaml @@ -109,12 +109,12 @@ updates: - target_component: Microsoft-Windows-Application-Experience-Core-Inventory-Service.Resources target_arch: amd64 version: 38655.38527.65535.65535 - - target_component: Microsoft-Windows-Application-Experience-Infrastructure - target_arch: amd64 - version: 38655.38527.65535.65535 - - target_component: Microsoft-Windows-Application-Experience-Infrastructure - target_arch: wow64 - version: 38655.38527.65535.65535 + # - target_component: Microsoft-Windows-Application-Experience-Infrastructure + # target_arch: amd64 + # version: 38655.38527.65535.65535 + # - target_component: Microsoft-Windows-Application-Experience-Infrastructure + # target_arch: wow64 + # version: 38655.38527.65535.65535 - target_component: Microsoft-Windows-Application-Experience-Inventory-Data-Sources target_arch: amd64 version: 38655.38527.65535.65535