微剋多資訊

 找回密碼
 註冊

Sign in with google

Google帳號登入

搜索

該用戶從未簽到

升級   0%

主題
發表於 2021-9-20 13:18 | 顯示全部樓層
Windows 11 第一版的RTM應該會是22000.x
22454是更下一版的測試版

StartIsBack (只適用22000) 可以達到你想要的
StartIsBack(TBD) beta test
1 0

使用道具

該用戶從未簽到

升級   0%

2F
發表於 2021-10-27 22:45 | 顯示全部樓層
本帖最後由 maodou 於 2021-10-28 01:26 編輯
foster 發表於 2021-10-27 11:01
Windows 11 Classic Context Menu v1.0

整合至$OEM$依然無作用

可以不用SetupComplete.cmd
把下面的code存成autounattend.xml, 放在跟Windows 11的setup.exe同一個目錄底下安裝:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <unattend xmlns="urn:schemas-microsoft-com:unattend">
  3.     <settings pass="windowsPE">
  4.         <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5.             <UserData>
  6.                 <ProductKey>
  7.                     <WillShowUI>Always</WillShowUI>
  8.                 </ProductKey>
  9.             </UserData>
  10.         </component>
  11.     </settings>
  12.     <settings pass="oobeSystem">
  13.         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  14.             <FirstLogonCommands>
  15.                 <SynchronousCommand wcm:action="add">
  16.                     <Order>1</Order>
  17.                     <Description>Set Windows 11 to use classic context menu</Description>
  18.                     <CommandLine>cmd /c reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve &amp; taskkill /f /im explorer.exe &amp; start explorer.exe &amp; timeout /t 10</CommandLine>
  19.                 </SynchronousCommand>
  20.             </FirstLogonCommands>
  21.         </component>
  22.     </settings>
  23. </unattend>
複製代碼

使用道具

該用戶從未簽到

升級   0%

3F
發表於 2021-10-28 14:47 | 顯示全部樓層
本帖最後由 maodou 於 2021-10-28 17:23 編輯
foster 發表於 2021-10-28 12:41
maodou大,你這一招試了一下,只有安裝完電腦後的第一個使用者適用,之後再建立新的使用者,登入後還是原本Win 11的右鍵UI介面。
...
這是目前想到可行的唯一方法,步驟稍嫌繁瑣,但可達到想要的目的,如有更簡便方法不吝指教!

試試看用這樣:
SetupComplete.cmd
  1. @echo off
  2. reg load HKLM\DEFAULT %SystemDrive%\Users\Default\ntuser.dat
  3. reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v ClassicContextMenu /t REG_SZ /d "cmd /c reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve & taskkill /f /im explorer.exe & start explorer.exe" /f
  4. reg unload HKLM\DEFAULT

  5. cmd /c reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve & taskkill /f /im explorer.exe & start explorer.exe

  6. cd /d %~dp0
  7. attrib -R -A -S -H *.*
  8. RMDIR /S /Q "%Systemroot%\Setup\Scripts"
複製代碼
  • 給你個讚

    foster 貢獻度 +5

使用道具

該用戶從未簽到

升級   0%

4F
發表於 2021-10-28 22:26 | 顯示全部樓層
本帖最後由 maodou 於 2021-10-28 22:39 編輯
foster 發表於 2021-10-28 21:41
其實還有個疑問,設定 RunOnce 不就代表每個新使用者第一次登入都會執行一次,
為什麼還需要再一行 cmd /c %WINDIR%\Setup\Script\ClassicContextMenu.com 讓第一個使用者第一次登入才會有作用?
修改過的ntuser.dat是要在新建另一個使用者時才會被複製套用(才會有RunOnce設定)
執行SetupComplete.cmd時, 第一個使用者已經第一次登入(他的預設值用的是沒改過的ntuser.dat, 不含SetupComplete.cmd正要新增的RunOnce設定)
所以需要再一行 cmd /c reg add... 直接去改第一個使用者的registry
後面新建的使用者, ntuser.dat已經有包含新增的RunOnce設定, 第一次登入時就會RunOnce去改registry

使用道具

該用戶從未簽到

升級   0%

5F
發表於 2021-10-28 23:32 | 顯示全部樓層
本帖最後由 maodou 於 2021-10-29 00:35 編輯
foster 發表於 2021-10-28 23:11
因為之前其他在 ntuser.dat 的設定,所有的新增使用者(包含第一個使用者)都可以直接套用,不需再針對第一個使用者再追加程式。
哈, 是我記錯了

在安裝程式完成後執行腳本
https://docs.microsoft.com/zh-tw/windows-hardware/manufacture/desktop/add-a-custom-script-to-windows-setup?view=windows-11

在安裝程式完成後執行腳本 (SetupComplete.cmd)
1. 安裝Windows之後,但在登入畫面出現之前,Windows安裝程式在%WINDIR%\Setup\Scripts\目錄中搜尋setupcomplete.cmd檔案。
2. 如果找到setupcomplete.cmd檔案,Windows安裝程式會執行腳本

所以寫成這樣就可以了:
  1. @echo off
  2. reg load HKLM\DEFAULT %SystemDrive%\Users\Default\ntuser.dat
  3. reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v ClassicContextMenu /t REG_SZ /d "cmd /c reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve & taskkill /f /im explorer.exe & start explorer.exe" /f
  4. reg unload HKLM\DEFAULT

  5. cd /d %~dp0
  6. attrib -R -A -S -H *.*
  7. RMDIR /S /Q "%WINDIR%\Setup\Scripts"
複製代碼

使用道具

您需要登入後才可以回帖 登入 | 註冊

本版積分規則

小黑屋|Archiver|微剋多資訊(MicroDuo)

GMT+8, 2024-5-15 11:47

Discuz! X

© 2009-2023 Microduo

快速回覆 返回頂部 返回列表