To get rid of traces of UWP ("Inbox") Apps, I used to be able to open and edit "C:\ProgramData\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" file with a SQL database editor. Later builds of Windows 10 (19041+) began preventing saving changes to that file, even when opened with NSudo and/or some other TrustedInstaller privilege methods. Is now not possible to make changes to that file?
not really needed https://forums.mydigitallife.net/th...n-windows-10-version-1809.78576/#post-1634118 https://forums.mydigitallife.net/th...n-windows-10-version-1809.78576/#post-1634306
Code: echo --- Remove SystemApps cd /d %~dp0 SetACL -ot "reg" -on "HKLM\SYSTEM\CurrentControlSet\Services\StateRepository" -actn setowner -ownr "n:Administrators" SetACL -ot "reg" -on "HKLM\SYSTEM\CurrentControlSet\Services\StateRepository" -actn ace -ace "n:Administrators;p:full" Powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\StateRepository' 'Start' 4 -Verbose" Powershell -Command "Stop-Service -Name StateRepository -Force -Verbose" Powershell -Command "Get-Service -Name StateRepository -Verbose" SetACL -ot "file" -on "%ProgramFiles%\WindowsApps" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramFiles%\WindowsApps" -actn ace -ace "n:Administrators;p:full" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository" -actn ace -ace "n:Administrators;p:full" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" -actn ace -ace "n:Administrators;p:full" IF EXIST "%ProgramData%\Microsoft\Windows\AppRepository\PackageRepository.edb" del /f /s /q /a "%ProgramData%\Microsoft\Windows\AppRepository\PackageRepository.edb" Powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\StateRepository' 'Start' 2 -Verbose" Powershell -Command "Start-Service -Name StateRepository -Verbose" Powershell -Command "Get-Service -Name StateRepository -Verbose" TASKLIST /svc /fi "services eq StateRepository" TASKKILL /F /FI "services eq StateRepository" /T SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "DROP TRIGGER IF EXISTS TRG_AFTER_UPDATE_Package_SRJournal;" SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "DROP TRIGGER IF EXISTS TRG_AFTERUPDATE_Package_SRJournal;" SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "UPDATE Package SET IsInBox=0 WHERE IsInBox=1;" Powershell -Command "Get-AppxPackage -AllUsers | Out-GridView -PassThru -Title 'Remove System Apps' | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue -Verbose" echo ====================================================== echo --- Recheck SystemApps Removal [IF Some Apps Are Left Before This Time They Will be Removed] SetACL -ot "reg" -on "HKLM\SYSTEM\CurrentControlSet\Services\StateRepository" -actn setowner -ownr "n:Administrators" SetACL -ot "reg" -on "HKLM\SYSTEM\CurrentControlSet\Services\StateRepository" -actn ace -ace "n:Administrators;p:full" Powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\StateRepository' 'Start' 4 -Verbose" Powershell -Command "Stop-Service -Name StateRepository -Force -Verbose" Powershell -Command "Get-Service -Name StateRepository -Verbose" SetACL -ot "file" -on "%ProgramFiles%\WindowsApps" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramFiles%\WindowsApps" -actn ace -ace "n:Administrators;p:full" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository" -actn ace -ace "n:Administrators;p:full" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" -actn setowner -ownr "n:Administrators" SetACL -ot "file" -on "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" -actn ace -ace "n:Administrators;p:full" IF EXIST "%ProgramData%\Microsoft\Windows\AppRepository\PackageRepository.edb" del /f /s /q /a "%ProgramData%\Microsoft\Windows\AppRepository\PackageRepository.edb" Powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\StateRepository' 'Start' 2 -Verbose" Powershell -Command "Start-Service -Name StateRepository -Verbose" Powershell -Command "Get-Service -Name StateRepository -Verbose" TASKLIST /svc /fi "services eq StateRepository" TASKKILL /F /FI "services eq StateRepository" /T SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "DROP TRIGGER IF EXISTS TRG_AFTER_UPDATE_Package_SRJournal;" SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "DROP TRIGGER IF EXISTS TRG_AFTERUPDATE_Package_SRJournal;" SQLite3 "%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd" "UPDATE Package SET IsInBox=0 WHERE IsInBox=1;" Powershell -Command "Get-AppxPackage -AllUsers | Out-GridView -PassThru -Title 'Remove System Apps' | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue -Verbose" Note : Sqlite3 & setacl are needed next to script. After i get a single comment or view from anybody on MDL forums on this comment of mine it will be removed on the go.