title: Windows 10 install features and developer mode offline
body: <p>I need to install OFFLINE features of Windows like "LegacyCompoents", "DirectPlay", ".NET Framework 3.5", "Windows Subsystem Linux" and "Developer Mode" on Windows 10 (Home/Pro x64 1909).</p>
  
  <p>Online, it works fine with that (run as admin, obviously):</p>
  
  <pre><code>cls
  @echo off
  cd /d "%~dp0"
  
  reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /v "AllowDevelopmentWithoutDevLicense" /d "1" /f &gt;nul
  dism /online /add-capability /capabilityname:Tools.DeveloperMode.Core~~~~0.0.1.0 /norestart
  dism /online /enable-feature /featurename:NetFx3 /norestart
  dism /online /enable-feature /featurename:LegacyComponents /norestart
  dism /online /enable-feature /featurename:DirectPlay /norestart
  dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
  
  pause
  exit
  </code></pre>
  
  <p>But offline, I can't get packages. So as to, I tried to upgrade an offline image to find packages in a folder like "/sources/sxs".</p>
  
  <p>I unpack my ".iso" image of Windows 10. This command gives me the number of the "Pro" installation = 6.</p>
  
  <pre><code>dism /get-imageinfo /imagefile:"%cd%\Windows 10 x64\sources\install.wim"
  </code></pre>
  
  <p>I mount the image.</p>
  
  <pre><code>if not exist "C:\test\offline" mkdir "C:\test\offline"
  dism /mount-image /imagefile:"%cd%\Windows 10 x64\sources\install.wim" /index:6 /mountdir:"C:\test\offline"
  </code></pre>
  
  <p>Until here, it works. But just after that, the Developer Mode fails.</p>
  
  <pre><code>dism /image:"C:\test\offline" /add-capability /capabilityname:Tools.DeveloperMode.Core~~~~0.0.1.0 /logpath:"%~dpn0.log"
  </code></pre>
  
  <blockquote>
    <p>Error: 0x800f081f The source files could not be found.
    Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see <a href="http://go.microsoft.com/fwlink/?LinkId=243077" rel="nofollow noreferrer">http://go.microsoft.com/fwlink/?LinkId=243077</a>.</p>
  </blockquote>
  
  <p>After that, .NET Framework 3.5 fails too, same error code.</p>
  
  <pre><code>dism /image:C:\test\offline /enable-feature /featurename:NetFx3 /logpath:"%~dpn0.log"
  </code></pre>
  
  <p>Otherwise, LegacyComponent, DirectPlay and Linux work fine.</p>
  
  <pre><code>dism /image:C:\test\offline /enable-feature /featurename:LegacyComponents
  dism /image:C:\test\offline /enable-feature /featurename:DirectPlay
  dism /image:C:\test\offline /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux
  </code></pre>
  
  <p>After that, I unmount the image, but I can't find the downloaded packages.</p>
  
  <pre><code>dism /unmount-image /mountdir:"C:\test\offline" /commit
  </code></pre>
  
  <p>My wish is to get ".cab" packages and to be able to install them just with a script like that:</p>
  
  <pre><code>cls
  @echo off
  cd /d "%~dp0"
  
  reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /v "AllowDevelopmentWithoutDevLicense" /d "1" /f &gt;nul
  dism /online /add-capability /capabilityname:Tools.DeveloperMode.Core~~~~0.0.1.0 /limitaccess /source:"%cd%\Packages" /logpath:"%~dpn0.log" /norestart
  dism /online /enable-feature /featurename:NetFx3           /limitaccess /source:"%cd%\Packages" /logpath:"%~dpn0.log" /norestart
  dism /online /enable-feature /featurename:LegacyComponents /limitaccess /source:"%cd%\Packages" /logpath:"%~dpn0.log" /norestart
  dism /online /enable-feature /featurename:DirectPlay       /limitaccess /source:"%cd%\Packages" /logpath:"%~dpn0.log" /norestart
  dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /limitaccess /source:"%cd%\Packages" /logpath:"%~dpn0.log" /norestart
  
  echo.
  timeout 5
  del /f /q "%~dpn0.log"
  </code></pre>
  
  <p>Can you help me, please?</p>
  
  <p>Best regards,</p>