windows:windows_repair

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
windows:windows_repair [2020/02/15 12:42] – [xcopy コマンドを使った方法(完全な ACL に戻る!)] ともやんwindows:windows_repair [2020/05/05 15:36] ともやん
行 1: 行 1:
 +<html>
 +  <style>
 +    #result pre, #mincode pre {
 +      overflow: hidden;
 +      font-size: 10px;
 +    }
 +    #result_long pre {
 +      height: 400px;
 +      overflow: scroll;
 +      overflow-x: hidden;
 +      font-size: 10px;
 +    }
 +    #logo {
 +      background-color: white;
 +      padding: 10px;
 +      width: fit-content;
 +    }
 +    #logo p {
 +      margin: 0;
 +    }
 +    #or {
 +      vertical-align: middle;
 +      padding: 10px;
 +    }
 +  </style>
 +</html>
 ====== Windows 10 の修復 ====== ====== Windows 10 の修復 ======
 **注意!** この情報は未整理です。随時まとめていきます。\\ **注意!** この情報は未整理です。随時まとめていきます。\\
行 15: 行 41:
 Windows のスタートメニューが開かない、Microsoft Store や Microsoft Edge も起動しないなどの症状が発生している場合、これらは何れも UWP アプリケーションとして実装されているため、UWP アプリケーションの実行環境に異常が発生していることが原因であると考えられる。\\ Windows のスタートメニューが開かない、Microsoft Store や Microsoft Edge も起動しないなどの症状が発生している場合、これらは何れも UWP アプリケーションとして実装されているため、UWP アプリケーションの実行環境に異常が発生していることが原因であると考えられる。\\
 \\ \\
-以下の手順は、Shift+再起動から「トラブルシューティング」を選択して、「コマンドプロンプト」から実行します。\\ +以下の手順は、**Shift + 再起動** から「トラブルシューティング」を選択して、「コマンドプロンプト」から実行します。\\ 
-\\+または、コマンドプロンプトを管理者実行して、以下のコマンドを実行し「トラブルシューティング」を選択して、「コマンドプロンプト」から実行します。\\ 
 +<WRAP group> 
 + 
 +<WRAP left column> 
 +<code dos> 
 +> reagentc /boottore 
 +</code> 
 +</WRAP> 
 + 
 +<WRAP left column> 
 +<WRAP #or>or</WRAP> 
 +</WRAP> 
 + 
 +<WRAP left column> 
 +<code dos> 
 +> shutdown /r /o /t 0 
 +</code> 
 +</WRAP> 
 + 
 +</WRAP>
  
 ==== xcopy コマンドを使った方法(まだ完全な ACL ではないかも...) ==== ==== xcopy コマンドを使った方法(まだ完全な ACL ではないかも...) ====
-<code>+<WRAP prewrap 100%> 
 +<code dos>
 > xcopy "D:\Program Files\WindowsApps" "D:\Program Files\WindowsApps_tmp" /i /s /e /h /y > xcopy "D:\Program Files\WindowsApps" "D:\Program Files\WindowsApps_tmp" /i /s /e /h /y
 > attrib -h "D:\Program Files\WindowsApps" > attrib -h "D:\Program Files\WindowsApps"
行 28: 行 74:
 > shutdown /r /t 0 > shutdown /r /t 0
 </code> </code>
 +</WRAP>
 +
 +<WRAP prewrap 100%>
 <code batch reset_acl_winapps.cmd> <code batch reset_acl_winapps.cmd>
 xcopy "D:\Program Files\WindowsApps" "D:\Program Files\WindowsApps_tmp" /i /s /e /h /y xcopy "D:\Program Files\WindowsApps" "D:\Program Files\WindowsApps_tmp" /i /s /e /h /y
行 36: 行 85:
 attrib -a +h "D:\Program Files\WindowsApps" attrib -a +h "D:\Program Files\WindowsApps"
 </code> </code>
 +</WRAP>
 +
 ==== icacls コマンドを使った方法(完全には戻らない...) ==== ==== icacls コマンドを使った方法(完全には戻らない...) ====
 **icacls** コマンドで **WindowsApps** フォルダの ACL をリセットして PC を再起動する。\\  **icacls** コマンドで **WindowsApps** フォルダの ACL をリセットして PC を再起動する。\\ 
 <code> <code>
 > icacls "D:\Program Files\WindowsApps" /Q /C /T /reset > icacls "D:\Program Files\WindowsApps" /Q /C /T /reset
-> shutdown /r /t 0+D:\Windows\System32\shutdown /r /t 0
 </code> </code>
 **icacls コマンドラインオプション**\\ **icacls コマンドラインオプション**\\
行 59: 行 110:
  
 ==== C:\Program Files\WindowsApps の正常なアクセス権の状態 ==== ==== C:\Program Files\WindowsApps の正常なアクセス権の状態 ====
 +<WRAP prewrap 100%>
 <code> <code>
 > icacls "C:\Program Files\WindowsApps" > icacls "C:\Program Files\WindowsApps"
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 C:\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(F) C:\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(F)
                              NT SERVICE\TrustedInstaller:(OI)(CI)(IO)(F)                              NT SERVICE\TrustedInstaller:(OI)(CI)(IO)(F)
行 75: 行 130:
 1 個のファイルが正常に処理されました。0 個のファイルを処理できませんでした 1 個のファイルが正常に処理されました。0 個のファイルを処理できませんでした
 </code> </code>
 +</WRAP>
  
 ACL の保存。\\ ACL の保存。\\
行 85: 行 141:
 ==== 正常な ACL の例 ==== ==== 正常な ACL の例 ====
 icacls /save の出力(見やすいように改行)\\ icacls /save の出力(見やすいように改行)\\
 +<WRAP prewrap 100% #result>
 <code> <code>
 WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08 WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08
行 103: 行 160:
 S:AI S:AI
 </code> </code>
 +</WRAP>
  
 ==== 壊れた ACL の例 ==== ==== 壊れた ACL の例 ====
 +<WRAP prewrap 100% #result>
 <code> <code>
 WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08 WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08
行 120: 行 179:
 S: S:
 </code> </code>
 +</WRAP>
 +
 icacls の出力\\ icacls の出力\\
 +<WRAP prewrap 100%>
 <code> <code>
 > icacls "C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08" > icacls "C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08"
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code>
 C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08 C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08
  NT SERVICE\TrustedInstaller:(I)(OI)(CI)(F)  NT SERVICE\TrustedInstaller:(I)(OI)(CI)(F)
行 136: 行 202:
 1 個のファイルが正常に処理されました。0 個のファイルを処理できませんでした 1 個のファイルが正常に処理されました。0 個のファイルを処理できませんでした
 </code> </code>
 +</WRAP>
 +
 PowerShell の Get-acl による SDDL 出力\\ PowerShell の Get-acl による SDDL 出力\\
 <WRAP prewrap 100%> <WRAP prewrap 100%>
 <code powershell> <code powershell>
 PS > (Get-Acl "C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08").GetSecurityDescriptorSddlForm('All') PS > (Get-Acl "C:\Program Files\WindowsApps\57540AMZNMobileLLC.AmazonAlexa_2.8.315.0_neutral_split.language-ja_22t9g3sebte08").GetSecurityDescriptorSddlForm('All')
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 O:S-1-5-21-862093196-3552257265-3460289004-1001G:SYD:AI(A;OICIID;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIID;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIID;FA;;;SY)(A;CIID;0x1200a9;;;BA)(A;OICIID;0x1200a9;;;LS)(A;OICIID;0x1200a9;;;NS)(A;OICIID;0x1200a9;;;RC)(A;OICIID;FA;;;S-1-5-21-862093196-3552257265-3460289004-1001) O:S-1-5-21-862093196-3552257265-3460289004-1001G:SYD:AI(A;OICIID;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIID;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIID;FA;;;SY)(A;CIID;0x1200a9;;;BA)(A;OICIID;0x1200a9;;;LS)(A;OICIID;0x1200a9;;;NS)(A;OICIID;0x1200a9;;;RC)(A;OICIID;FA;;;S-1-5-21-862093196-3552257265-3460289004-1001)
 </code> </code>
 </WRAP> </WRAP>
  
-==== 参考文献 ==== +==== Microsoft Store アプリの ACL ==== 
-[[https://www.atmarkit.co.jp/ait/articles/0603/25/news016.html|Windowsのセキュリティ設定を記述するSDDL文字列とは?:Tech TIPS - @IT]]\\ +<WRAP prewrap 100%> 
-[[https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/replacing-ntfs-permissions-with-sddl-information|Replacing NTFS Permissions with SDDL Information - Power Tips - PowerTips - IDERA Community]]\\ +<code powershell> 
-[[https://clan8blog.wordpress.com/2016/08/08/sddl-explained/|]]\\+PS > cd 'C:\Program Files\WindowsApps\' 
 +PS > dir Microsoft.WindowsStore* 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +    Directory: C:\Program Files\WindowsApps
  
-===== dism 展開イメージのサービスと管理 ===== +Mode                 LastWriteTime         Length Name 
-DISM(Deployment Image Servicing and Management) -「展開イメージのサービスと管理」とは...+----                 -------------         ------ ---
 +d----          2020/02/08    23:22                Microsoft.WindowsStore_12001.1001.5.0_neutral_split.language-ja_8wekyb3d8bbwe 
 +d----          2020/02/08    23:22                Microsoft.WindowsStore_12001.1001.5.0_neutral_split.scale-100_8wekyb3d8bbwe 
 +d----          2020/02/18    11:40                Microsoft.WindowsStore_12002.1001.1.0_neutral_split.language-ja_8wekyb3d8bbwe 
 +d----          2020/02/18    11:40                Microsoft.WindowsStore_12002.1001.1.0_neutral_split.scale-100_8wekyb3d8bbwe 
 +d----          2020/02/18    11:40                Microsoft.WindowsStore_12002.1001.1.0_x64__8wekyb3d8bbwe 
 +d----          2020/02/18    11:40                Microsoft.WindowsStore_12002.1001.113.0_neutral_~_8wekyb3d8bbwe 
 +</code> 
 +</WRAP>
  
 +<WRAP prewrap 100%>
 <code powershell> <code powershell>
-PS > dism /Online /Cleanup-image /ScanHealth+PS > icacls Microsoft.WindowsStore_12002.1001.1.0_x64__8wekyb3d8bbwe 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +Microsoft.WindowsStore_12002.1001.1.0_x64__8wekyb3d8bbwe 
 + BUILTIN\Users:(OI)(CI)(Rc,S,RD,REA,X,RA) 
 + S-1-15-3-1609473798-1231923017-684268153-4268514328-882773646-2760585773-1760938157:(OI)(CI)(RX) 
 + BUILTIN\Users:(OI)(CI)(R) 
 + NT SERVICE\TrustedInstaller:(I)(F) 
 + NT SERVICE\TrustedInstaller:(I)(CI)(IO)(F) 
 + NT AUTHORITY\SYSTEM:(I)(F) 
 + NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F) 
 + BUILTIN\Administrators:(I)(F) 
 + BUILTIN\Administrators:(I)(OI)(CI)(IO)(F) 
 + BUILTIN\Users:(I)(RX) 
 + BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE) 
 + CREATOR OWNER:(I)(OI)(CI)(IO)(F) 
 + APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX) 
 + APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(OI)(CI)(IO)(GR,GE) 
 + APPLICATION PACKAGE AUTHORITY\制限されたすべてのアプリケーション パッケージ:(I)(RX) 
 + APPLICATION PACKAGE AUTHORITY\制限されたすべてのアプリケーション パッケージ:(I)(OI)(CI)(IO)(GR,GE) 
 + S-1-19-512-4096:(OI)(CI)(RX,D,WDAC,WO,WA)
  
-Deployment Image Servicing and Management tool +1 個のファイルが正常に処理されました。個のファイルを処理できませんでした 
-Version: 10.0.19559.1000+</code> 
 +</WRAP>
  
-Image Version: 10.0.19559.1000+<WRAP prewrap 100%> 
 +<code powershell> 
 +PS > icacls Microsoft.WindowsStore_12001.1001.5.0_neutral_split.scale-100_8wekyb3d8bbwe 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +Microsoft.WindowsStore_12001.1001.5.0_neutral_split.scale-100_8wekyb3d8bbwe 
 + NT SERVICE\TrustedInstaller:(I)(F) 
 + NT SERVICE\TrustedInstaller:(I)(CI)(IO)(F) 
 + NT AUTHORITY\SYSTEM:(I)(F) 
 + NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F) 
 + BUILTIN\Administrators:(I)(F) 
 + BUILTIN\Administrators:(I)(OI)(CI)(IO)(F) 
 + BUILTIN\Users:(I)(RX) 
 + BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE) 
 + CREATOR OWNER:(I)(OI)(CI)(IO)(F) 
 + APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX) 
 + APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(OI)(CI)(IO)(GR,GE) 
 + APPLICATION PACKAGE AUTHORITY\制限されたすべてのアプリケーション パッケージ:(I)(RX) 
 + APPLICATION PACKAGE AUTHORITY\制限されたすべてのアプリケーション パッケージ:(I)(OI)(CI)(IO)(GR,GE) 
 + S-1-19-512-4096:(OI)(CI)(RX,D,WDAC,WO,WA)
  
-[==========================100.0%==========================] No component store corruption detected. +1 個のファイルが正常に処理されました。個のファイルを処理できませんでした 
-The operation completed successfully.+</code> 
 +</WRAP>
  
-PS > dism /Online /Cleanup-image /RestoreHealth+<WRAP prewrap 100%> 
 +<code powershell> 
 +PS > (Get-Acl Microsoft.WindowsStore_12002.1001.1.0_x64__8wekyb3d8bbwe).GetSecurityDescriptorSddlForm('All'
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +O:SYG:SYD:AI 
 +(XA;OICI;0x1200a9;;;BU;(WIN://SYSAPPID Contains "MICROSOFT.WINDOWSSTORE_8WEKYB3D8BBWE")) 
 +(A;OICI;FR;;;BU) 
 +(A;OICI;0x1200a9;;;S-1-15-3-1609473798-1231923017-684268153-4268514328-882773646-2760585773-1760938157) 
 +(A;ID;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464) 
 +(A;CIIOID;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464) 
 +(A;ID;FA;;;SY) 
 +(A;OICIIOID;GA;;;SY) 
 +(A;ID;FA;;;BA) 
 +(A;OICIIOID;GA;;;BA) 
 +(A;ID;0x1200a9;;;BU) 
 +(A;OICIIOID;GXGR;;;BU) 
 +(A;OICIIOID;GA;;;CO) 
 +(A;ID;0x1200a9;;;AC) 
 +(A;OICIIOID;GXGR;;;AC) 
 +(A;ID;0x1200a9;;;S-1-15-2-2) 
 +(A;OICIIOID;GXGR;;;S-1-15-2-2) 
 +</code> 
 +</WRAP>
  
-Deployment Image Servicing and Management tool +<WRAP prewrap 100%> 
-Version: 10.0.19559.1000+<code powershell> 
 +PS > (Get-Acl Microsoft.WindowsStore_12001.1001.5.0_neutral_split.scale-100_8wekyb3d8bbwe).GetSecurityDescriptorSddlForm('All'
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +O:BAG:S-1-5-21-2262952106-645740239-3783781030-513D:AI 
 +(A;ID;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464) 
 +(A;CIIOID;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464) 
 +(A;ID;FA;;;SY) 
 +(A;OICIIOID;GA;;;SY) 
 +(A;ID;FA;;;BA) 
 +(A;OICIIOID;GA;;;BA) 
 +(A;ID;0x1200a9;;;BU) 
 +(A;OICIIOID;GXGR;;;BU) 
 +(A;OICIIOID;GA;;;CO) 
 +(A;ID;0x1200a9;;;AC) 
 +(A;OICIIOID;GXGR;;;AC) 
 +(A;ID;0x1200a9;;;S-1-15-2-2) 
 +(A;OICIIOID;GXGR;;;S-1-15-2-2) 
 +</code> 
 +</WRAP>
  
-Image Version: 10.0.19559.1000+<WRAP prewrap 100%> 
 +<code powershell> 
 +PS > (New-Object System.Security.Principal.SecurityIdentifier('S-1-15-3-1609473798-1231923017-684268153-4268514328-882773646-2760585773-1760938157')).Translate([System.Security.Principal.NTAccount]).Value 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +MethodInvocationException: Exception calling "Translate" with "1" argument(s): "Some or all identity references could not be translated.
 +</code> 
 +</WRAP>
  
-[===========================84.9%=================         The restore operation completed successfully+<WRAP prewrap 100%> 
-The operation completed successfully.+<code powershell> 
 +PS > (New-Object System.Security.Principal.SecurityIdentifier('S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464')).Translate([System.Security.Principal.NTAccount]).Value 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +NT SERVICE\TrustedInstaller
  
-PS > sfc /ScanNow+PS > (New-Object System.Security.Principal.SecurityIdentifier('S-1-15-2-2')).Translate([System.Security.Principal.NTAccount]).Value 
 +APPLICATION PACKAGE AUTHORITY\制限されたすべてのアプリケーション パッケージ 
 +</code> 
 +</WRAP>
  
-シスム スキャン開始していま。これにしばらく時間がかかります。+==== 参考文献 ==== 
 +[[https://www.atmarkit.co.jp/ait/articles/0603/25/news016.html|Windowsのセキュリィ設定記述るSDDL文字列と?:Tech TIPS - @IT]]\\ 
 +[[https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/replacing-ntfs-permissions-with-sddl-information|Replacing NTFS Permissions with SDDL Information - Power Tips - PowerTips - IDERA Community]]\\ 
 +[[https://clan8blog.wordpress.com/2016/08/08/sddl-explained/|]]\\
  
-システム スキャン検証フェーズを開始しています。 +===== dism - 展開イメージと管理 ===== 
-検証 100% が完了しました。 +[[windows:dism|dism 展開イメージのサービスと管理]]\\
- +
-Windows リソース保護は、整合性違反を検出しませんでした。 +
- +
-PS > Get-AppxPackage -allusers Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"+
- +
-PS > Restart-Computer +
-</code>+
  
 ===== 信頼性モニターのレポート格納場所 ===== ===== 信頼性モニターのレポート格納場所 =====
行 197: 行 388:
 C:\Windows\Logs\CBS\CBS.log C:\Windows\Logs\CBS\CBS.log
 </code> </code>
 +
 +===== Microsoft Store が動作しない / 表示異常 =====
 +Microsoft Store 設定やキャッシュなどのデータを初期化する。\\
 +<code powershell>
 +$ WSReset
 +</code>
 +初期化処理が開始される。\\
 +{{:windows:wsreset_exe.png?640|WSreset}}\\
 +処理が完了すると Microsoft Store が起動する。\\
 +{{:windows:wsreset_exe_ms_store.png?640|Microsoft Store}}\\
  
 ===== 参考文献 ===== ===== 参考文献 =====
 [[https://qiita.com/Yorcna/items/ecddbdb02caee51d89f2|]]\\ [[https://qiita.com/Yorcna/items/ecddbdb02caee51d89f2|]]\\
 [[https://freesoft.tvbok.com/win10/desktop/start_menu_disabled.html|Windows10のスタートメニューが 開かない・表示されない 場合の対処方法 - ぼくんちのTV 別館]]\\ [[https://freesoft.tvbok.com/win10/desktop/start_menu_disabled.html|Windows10のスタートメニューが 開かない・表示されない 場合の対処方法 - ぼくんちのTV 別館]]\\
 +[[https://tutorialmore.com/questions-945237.htm|Windows 10:SFCとDISMは破損を修復できません - 初心者向けチュートリアル]]\\
  
  • windows/windows_repair.txt
  • 最終更新: 2020/09/19 11:37
  • by ともやん