This is the result of a combination of things. With each successive iteration, 1507, 1511, 1607, 1703, 1709, 1803 things have changed subtly. A fun sleuthing experience each time.
Answer this. Are you doing a copyprofile=true? Google from there.
I recommend building your Win10 image in a VM and include the following.
-
Disconnect the NIC before installing (to prevent Windows Store updates which WILL otherwise cause problems)
-
When you reach the Sysprep Tool at the desktop, always only CANCEL. Selecting Enter Audit Mode will generate an extra (invisible) File Explorer.exe shortcut in “C:\Users\Administrator\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\”
-
DISABLE Store AutoUpdates policy while building
Computer \ Administrative Templates \ Windows Components \ Store
- Turn off Automatic Download and Install of updates = ENABLED
- DISABLE Microsoft Store Install Service (InstallService)
- CMD: net stop InstallService
- CMD: sc config InstallService start= disabled
-
Reboot
-
Connect your NIC
-
While building your image, to prevent Windows 10 (ie: Edge) from resetting file associations apply this v1803.reg
Windows Registry Editor Version 5.00
; Description Prevents Windows 10 from resetting the file associations
; ... by adding NoOpenWith & NoStaticDefaultVerb values for all the modern apps.
; Created on Feb 13 2016 by Ramesh Srinivasan
; Updated on Sep 28 2016
; The Winhelponline Blog
; http://www.winhelponline.com/blog/windows-10-resetting-file-associations/
; Tested in Windows 10 v1511 & 1607
; Updated 20180522 for Windows 10v1803 by Robert Sudbury
;-------------------
; Microsoft Edge
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.MicrosoftEdge_42.17134.1.0_neutral__8wekyb3d8bbwe\MicrosoftEdge\Capabilities\FileAssociations]
;-------------------
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9]
;File Types .htm, .html
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723]
;File Types .pdf
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs]
;File Types .svg
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t]
;File Types .xml
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXvepbp3z66accmsd0x877zbbxjctkpr6t]
;File Types .epub
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;-------------------
; Microsoft Windows Photos
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Windows.Photos_2018.18011.15918.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
;-------------------
;File Types .bmp, .dib, .gif, .ico, .jfif, .jpe, .jpeg, .jpg, .jxr, .png, .thumb, .tif, .tiff, .wdp
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;File Types .arw, .cr2, .crw, .erf, .kdc, .mrw, .nef, .nrw, .orf, .pef, .raf, .raw, .rw2, .rwl, .sr2, .srw,
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX9rkaq77s0jzh1tyccadx9ghba15r6t3h]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;File Types .dng
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXvvwq6wxamf7qhxd0vn6wm1wwehyxrdd6]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;File Types .3g2, .3gp, .3gp2, .3gpp, .asf, .avi, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mp4v, .mts, .wm, .wmv
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXk0g4vb8gvt7b93tg50ybcy892pge6jmt]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;-------------------
; Microsoft3DViewer
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Microsoft3DViewer_2.1803.8022.0_x64__8wekyb3d8bbwe\Microsoft.Microsoft3DViewer\Capabilities\FileAssociations]
;-------------------
;File Types .3MF, .OBJ, .STL, .PLY, .GLTF, .GLB
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXmgw6pxxs62rbgfp9petmdyb4fx7rnd4k]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;-------------------
; Groove Music
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.ZuneMusic_10.17112.19011.0_x64__8wekyb3d8bbwe\Microsoft.ZuneMusic\Capabilities\FileAssociations]
;-------------------
;File Types .aac, .ac3, .adt, .adts, .amr, .ec3, .flac, .m4a, .m4r, .mka, .mp3, .mpa, .wav, .wma, .m3u, .wpl, .zpl
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;-------------------
; Films & TV
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.ZuneVideo_10.17112.19011.0_x64__8wekyb3d8bbwe\Microsoft.ZuneVideo\Capabilities\FileAssociations]
;-------------------
;File Types .3g2, .3gp, .3gp2, .3gpp, .asf, .avi, .divx, .m1v, .m2ts, .m2t, .m2v, .m4v, .mkv, .mod, .mov, .mp2v, .mp4, .mp4v, .mpe, .mpeg, .mpg, .mpv2, .mts, .tod, .ts, .tts, .wm, .wmv, .xvid
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX6eg8h5sxqq90pv53845wmnbewywdqq5h]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;-------------------
; Print3D
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Print3D_2.0.3621.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
;-------------------
;File Types .stl, .3mf, .obj, .wrl, .ply
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXr0rz9yckydawgnrx5df1t9s57ne60yhn]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
;-------------------
; Windows Sound Recorder
; [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.WindowsSoundRecorder_10.1712.10611.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
;-------------------
;File Types .m4a
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX5sy1gww9q4g2gt941cdxxd7s07xe5vph]
"NoOpenWith"=""
"NoStaticDefaultVerb"=""
To Master your image for capturing is where a lot of voodoo happens depending on your environment and what you want to happen. I incorporate unattend.xml, Scripts (ErrorHandler.cmd + SetupComplete.cmd) and custom scripts for auto-logon and more.
- To cleanup problems caused by COPYPROFILE=TRUE, I include the following in my SetupComplete.cmd
REM "Clean up problems caused by using COPYPROFILE=TRUE"
rd /s /q "C:\Users\Administrator\AppData\Local\Microsoft\Windows\WebCache"
rd /s /q "C:\Users\Administrator\AppData\Local\Microsoft\Windows\INetCache"
del /f /q /a:sh "C:\Users\Administrator\AppData\Local\Microsoft\Windows\WebCacheLock.dat"
rd /s /q "C:\Users\Default\AppData\Local\Microsoft\Windows\WebCache"
rd /s /q "C:\Users\Default\AppData\Local\Microsoft\Windows\INetCache"
del /f /q /a:sh "C:\Users\Default\AppData\Local\Microsoft\Windows\WebCacheLock.dat"
- After setting file associations (eg: Chrome as default browser) I export these settings by:
dism.exe /Online /Export-DefaultAppAssociations:C:\temp\defaults.xml
- Add the following Prevent_Association_Reset.vbs to “%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\” . Yes it MUST be re-applied by the user. Sysprep wipes and rebuilds critical sections of the registry breaking what you originally setup to be prevented while building the image.
' UserRunOnce.vbs
' - configuration to be applied at USER logon
'
' 20180517 - initial release
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' Define Global Parameters
Option Explicit
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' Define Global Constants
Const gcERR1 = "-1"
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
' Define Global Objects
Dim objShell : Set objShell = Wscript.CreateObject( "Wscript.Shell" )
Dim objFSO : Set objFSO = CreateObject( "Scripting.FileSystemObject" )
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
' Make it so ...
sWindows_10v1803_File_Association_Reset_Prevent
Wscript.Quit
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=
' Define Subroutines
Sub sWindows_10v1803_File_Association_Reset_Prevent()
'Prevent Windows from resetting file associations
'-------------------
' Microsoft Windows Photos
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Windows.Photos_2018.18011.15918.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
'-------------------
'File Types .bmp, .dib, .gif, .ico, .jfif, .jpe, .jpeg, .jpg, .jxr, .png, .thumb, .tif, .tiff, .wdp
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc\NoStaticDefaultVerb","","REG_SZ"
'File Types .arw, .cr2, .crw, .erf, .kdc, .mrw, .nef, .nrw, .orf, .pef, .raf, .raw, .rw2, .rwl, .sr2, .srw,
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX9rkaq77s0jzh1tyccadx9ghba15r6t3h\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX9rkaq77s0jzh1tyccadx9ghba15r6t3h\NoStaticDefaultVerb","","REG_SZ"
'File Types .dng
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXvvwq6wxamf7qhxd0vn6wm1wwehyxrdd6\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXvvwq6wxamf7qhxd0vn6wm1wwehyxrdd6\NoStaticDefaultVerb","","REG_SZ"
'File Types .3g2, .3gp, .3gp2, .3gpp, .asf, .avi, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mp4v, .mts, .wm, .wmv
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXk0g4vb8gvt7b93tg50ybcy892pge6jmt\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXk0g4vb8gvt7b93tg50ybcy892pge6jmt\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Microsoft3DViewer
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Microsoft3DViewer_2.1803.8022.0_x64__8wekyb3d8bbwe\Microsoft.Microsoft3DViewer\Capabilities\FileAssociations]
'-------------------
'File Types .3MF, .OBJ, .STL, .PLY, .GLTF, .GLB
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXmgw6pxxs62rbgfp9petmdyb4fx7rnd4k\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXmgw6pxxs62rbgfp9petmdyb4fx7rnd4k\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Microsoft Edge
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.MicrosoftEdge_42.17134.1.0_neutral__8wekyb3d8bbwe\MicrosoftEdge\Capabilities\FileAssociations]
'-------------------
'File Types .htm, .html
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9\NoStaticDefaultVerb","","REG_SZ"
'File Types .pdf
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723\NoStaticDefaultVerb","","REG_SZ"
'File Types .svg
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs\NoStaticDefaultVerb","","REG_SZ"
'File Types .xml
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t\NoStaticDefaultVerb","","REG_SZ"
'File Types .epub
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXvepbp3z66accmsd0x877zbbxjctkpr6t\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXvepbp3z66accmsd0x877zbbxjctkpr6t\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Groove Music
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.ZuneMusic_10.17112.19011.0_x64__8wekyb3d8bbwe\Microsoft.ZuneMusic\Capabilities\FileAssociations]
'-------------------
'File Types .aac, .ac3, .adt, .adts, .amr, .ec3, .flac, .m4a, .m4r, .mka, .mp3, .mpa, .wav, .wma, .m3u, .wpl, .zpl
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Films & TV
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.ZuneVideo_10.17112.19011.0_x64__8wekyb3d8bbwe\Microsoft.ZuneVideo\Capabilities\FileAssociations]
'-------------------
'File Types .3g2, .3gp, .3gp2, .3gpp, .asf, .avi, .divx, .m1v, .m2ts, .m2t, .m2v, .m4v, .mkv, .mod, .mov, .mp2v, .mp4, .mp4v, .mpe, .mpeg, .mpg, .mpv2, .mts, .tod, .ts, .tts, .wm, .wmv, .xvid
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX6eg8h5sxqq90pv53845wmnbewywdqq5h\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX6eg8h5sxqq90pv53845wmnbewywdqq5h\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Print3D
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.Print3D_2.0.3621.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
'-------------------
'File Types .stl, .3mf, .obj, .wrl, .ply
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXr0rz9yckydawgnrx5df1t9s57ne60yhn\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppXr0rz9yckydawgnrx5df1t9s57ne60yhn\NoStaticDefaultVerb","","REG_SZ"
'-------------------
' Windows Sound Recorder
' [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.WindowsSoundRecorder_10.1712.10611.0_x64__8wekyb3d8bbwe\App\Capabilities\FileAssociations]
'-------------------
'File Types .m4a
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX5sy1gww9q4g2gt941cdxxd7s07xe5vph\NoOpenWith","","REG_SZ"
objShell.RegWrite "HKCU\SOFTWARE\Classes\AppX5sy1gww9q4g2gt941cdxxd7s07xe5vph\NoStaticDefaultVerb","","REG_SZ"
End Sub
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
' Define Functions
'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'EOF
- Disconnect the NIC, then rollback the preventative measures put in place at the start of the image build.
[Computer \ Admin Templates \ Windows Components \ Store]
- Turn off Automatic Download and Install of updates = NOT CONFIGURED
CMD: sc config InstallService start= demand
- Copy my scripts and .xml to their end locations then run sysprep as:
sysprep /generalize /oobe /quit /unattend:unattend.xml
… yes QUIT, not shutdown. This allows me to continue working.
- I then perform a file association defaults import. This could be included in coming out of sysprep, but I do so many other things at this stage that it’s easier for me to do it here.
dism.exe /Online /Import-DefaultAppAssociations:C:\temp\defaults.xml
- Finally I clear all the event logs
for /f %%a in ('WEVTUTIL EL') do WEVTUTIL CL "%%a"
- and defrag (even on a vm)
defrag c: /x /h /u /v
- Now I shutdown
shutdown -s -t 0
Among the crazier things, Windows 10 likes to revert certain elements of the results of Copy Profile AFTER coming out of sysprep, which makes timing of some of the steps above rather critical. They cannot happen before they are intended or your effort is wasted.
Now there is a LOT I left out that I use to optimize our images even more but these will get you around the current crop of v1803 gotchas.