win7 升級到 win10 後不能用 sysprep 換  SID

會有  error 
 SYSPRP spopk.dll:: Sysprep will not run on an upgraded OS. You can only run Sysprep on a custom (clean) install version of Windows.

google 到

移除 regedit 內的 
HKEY_LOCAL_MACHINE\SYSTEM\Setup\

Upgrade key.

 

網路上常見的 regedit 將 sysprep 重置

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
CleanupState:2

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
GeneralizationState:7

After done with the registry, do the following :

Start -> Run : msdtc -uninstall (wait few seconds)
Start -> Run : msdtc -install (wait few seconds)

用 whoami /user 保留舊 SID

++++  
移除 A
PP (後面文章有記錄要移除的原因)
++++  

POWERSHELL 下執行

Get-AppxPackage -AllUsers | where-object {$_.name –notlike "*store*"} | Remove-AppxPackage
Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike "*store*"} | R

------------------------------

編輯一下 金鑰匯入檔 c:\tmp\auto.xml

<!--*************************************************
Sysprep /generalize /oobe /shutdown /unattend:c:\tmp\auto.xml
**************************************************-->
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-Security-SPP" 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">
            <SkipRearm>1</SkipRearm>
        </component>
        <component name="Microsoft-Windows-PnpSysprep" 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">
            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <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">
            <ProductKey>VK7JG-NPHTM-C97JM-9MPGT-3V66T</ProductKey>
        </component>
    </settings>
</unattend>

 

在系統管理員權限下執行 

Sysprep /generalize /oobe /shutdown /unattend:c:\tmp\auto.xml

還原只能還原在已將 win7 升級到win10 的機器上 ....微軟會檢查這機器是否是由 win7 升級上去的

如沒升級過的電腦會是未啟動的狀態 .......

拿台空機裝發現未啟動 ....哈哈

要用 slmgr.vbs -xpr 查看是否起動

 

-----------------------------------------------------

金鑰用 

That is the generic key. Here are all generic keys:
Windows 10 Home : YTMG3-N6DKC-DKB77-7M9GH-8HVX7
Windows 10 Home SL- : BT79Q-G7N6G-PGBYW-4YWX6-6F4BT
Windows 10 Pro : VK7JG-NPHTM-C97JM-9MPGT-3V66T
Windows 10 Pro VL-MAK : QJNXR-7D97Q-K7WH4-RYWQ8-6MT6Y

EDIT: If you have already upgraded to Windows 10 and it is activated, 
DO NOT reinstall using one of these keys. Just skip the key entry process 
and it will activate automatically.

檢查金鑰
slmgr.vbs /dlv

---------------------------------------------------------------------------------------------------------

嘗試的過程 .......

-------------------------------------------------------------------

 

再看有沒有 error .....
移除 error 的 Packag 9E2F88E3.Twitter_5.0.0.0_x86__wgeqdkkx372wm

用 powershell .....

Remove-AppXPackage 9E2F88E3.Twitter_5.0.0.0_x86__wgeqdkkx372wm

還有 error king.com.CandyCrushSodaSaga_1.62.900.0_x86__kgqvnymyfvs32 

再移除 ....

 
Remove-AppXPackage king.com.CandyCrushSodaSaga_1.62.900.0_x86__kgqvnymyfvs32 
 
好了 ....
 
例如 :
 
 
 
 

........................................................................................................................

多次嘗試

 

等一下 .....當機了 ...不管重開機
發現 SID 已變更了 ........

如再來一次  sysprep (會發現要輸入金鑰了 .......)

等進去發現可啟動 slmgr.vbs /dlv 次數減少了 ....哈哈 ...

 

arrow
arrow

    echochio 發表在 痞客邦 留言(0) 人氣()