Windows 10: How to Enable S mode in Windows 10

Page 1 of 2 12 LastLast
  1.    1 Week Ago #1

    How to Enable S mode in Windows 10


    How to Enable S mode in Windows 10


    Windows 10 in S mode is a mode that can be applied to a Windows edition to enable a productive Windows experience that's streamlined for security and performanace. By exclusively using apps in the Microsoft Store and ensuring that you browse safely with Microsoft Edge, Windows 10 in S mode keeps you running fast and secure day in and day out. The same technology that makes Windows 10 in S mode secure also creates some differences when creating software images for Windows 10 devices.

    In previous versions of Windows, Windows 10 S was a separate edition that required working with a different Windows image than non-S editions. Starting with Windows 10 version 1803, you can Enable S mode on supported Windows editions.

    It is not well publicised yet but you can set up S mode in PRO and Home at least (not sure about other SKUs).

    To enable S mode, you'll create an unattend.xml file, and then use DISM to apply the unattend file to a mounted Windows image.


    Here's How:

     Step 1 - create file stucture for dism commands


    I created the following file structure to do this

    C:\test\offline\answerfiles containing the xml file (I called it myunattend.xml file) created in step 2

    C:\test\images containing the install wim file that we modify from the default in the standard MS isoMount standard 1803 iso as a drive and copy install.wim from sources folder (note - I downloaded iso direct rather than via mct which uses install.esd)

    C:\test\offline which needs to be created up front even though blank.


     Step 2 - Create myunattend.xml file


    I then installed 1803 ADK and Windows SIM to create the unattend file.

    See tutorial link below for the instructions to download and run elevated Deployment and Imaging Tools Environment are in steps 5.3 & 5.4.

    Create Windows 10 ISO image from Existing Installation | Windows 10 Tutorials

    using latest 1803 ADK, and only installed the following component as per

    Enable S mode | Microsoft Docs

    i.e.amd64_Microsoft_Windows_CodeIntegrity component to Pass 2 offline Servicing

    and set

    amd64_Microsoft_Windows_CodeIntegrity\SkuPolicyRequired to 1.

    I then saved the xml file as myunattend.xml in folder as above.You can skip all the ADK/SIM stuff by simply copying following code to myunattend.xml file if you like using notepad or similar.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    
        <settings pass="offlineServicing">
    
            <component name="Microsoft-Windows-CodeIntegrity" 
    
    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">
    
                <SkuPolicyRequired>1</SkuPolicyRequired>
     
           </component>
        </settings>
    
     
    xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    
    </unattend>

     Step 3 - apply dism to unattend file


    Type the following command to mount the offline Windows image.

    Code:
    Dism /Mount-Image /ImageFile:C:\test\images\install.wim /name:"Windows 10 Pro" /MountDir:C:\test\offline
    For Home, change name to "Windows 10 Home"

    Type the following command to apply the unattended answer file to the image.

    Code:
    DISM /Image:C:\test\offline /Apply-Unattend:C:\test\answerfiles\myunattend.xml

    Type the following command to commit the changes and unmount the image.
    Code:
    Dism /Unmount-Image /MountDir:C:\test\offline /Commit

    Sometimes it does not properly dismount the files and gives an error message. The install.wim file is properly updated though. If you get that error, run following to tidy up dismounting.


    Code:
    Dism /cleanup-mountpoints
     Step 4 - Install Pro 10 S


    Create usb installation flash drive using standard windows iso, and replace install.wim in sources directory with modified install.wim in images directory

    Install and setup in normal way, choosing Home or Pro as appropriate

    You now have PRO or Home 10 S running in S mode.

    You can in fact modify same install.wim twice repeating Step 3 above so iso has both Home 10S and Pro 10S.


     Step 5 - Optional - Create bootable iso


    Crete two new subfolders

    c:\test\iso

    c:\test\iso\isofiles

    Copy all files from bootable installation drive to c:\test\iso\isofiles

    Run following command from command prompt in windows adk kit. If you just copied xml file, you will need to install this as per link (install latest 1803 adk) - only need to install deployment tools ( copy of picture by @Kari)

    Download and install the Windows ADK | Microsoft Docs

    Click image for larger version. 

Name:	2014-11-20_20h09_22.png 
Views:	48 
Size:	81.8 KB 
ID:	188741

    Click image for larger version. 

Name:	image.png 
Views:	47 
Size:	6.9 KB 
ID:	188740


    Code:
    oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\test\iso\isofiles\boot\etfsboot.com#pEF,e,bc:\test\iso\isofiles\efi\microsoft\boot\efisys.bin c:\test\iso\isofiles c:\test\iso\10S.iso

    You will now have a bootable iso 10S.iso in c:\test\iso folder.
    Last edited by Brink; 3 Days Ago at 10:27.
      My ComputerSystem Spec

  2.    1 Week Ago #2

    Nice work, @cereberus! You're on a roll lately. Keep it up.
    --Ed--
      My ComputersSystem Spec


  3. Posts : 13,955
    Windows 10 Pro
       1 Week Ago #3

    Nice work Martin!

    Just one thing: the cpi:offlineimage line in answer file (highlighted below) is totally unnecessary, created by Windows SIM for reference purposes only, telling which image was used as reference to create answer file. It can be completely removed from all answer files ever created with Windows SIM.

    It does no harm if left in place, it's just that it is not needed nor required.

    cereberus said: View Post
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    
        <settings pass="offlineServicing">
    
            <component name="Microsoft-Windows-CodeIntegrity" 
    
    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">
    
                <SkuPolicyRequired>1</SkuPolicyRequired>
     
           </component>
        </settings>
    
        <cpi:offlineImage cpi:source="wim://desktop-a18/ctest/images/install.wim#Windows 10 Pro"
    xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    
    </unattend>
      My ComputerSystem Spec

  4.    1 Week Ago #4

    Kari said: View Post
    Nice work Martin!

    Just one thing: the cpifflineimage line in answer file (highlighted below) is totally unnecessary, created by Windows SIM for reference purposes only, telling which image was used as reference to create answer file. It can be completely removed from all answer files ever created with Windows SIM.

    It does no harm if left in place, it's just that it is not needed nor required.
    Ah - Thanks - I will remove it as that makes the xml file standalone


    It took me a while to get it right as the MS instructions are unclear and their code to copy is actually incorrect.

    With a bit of effort, this guide could be upgraded to a proper tutorial I guess.
      My ComputerSystem Spec

  5.    1 Week Ago #5

    Kari said: View Post
    Nice work Martin!

    Just one thing: the cpifflineimage line in answer file (highlighted below) is totally unnecessary, created by Windows SIM for reference purposes only, telling which image was used as reference to create answer file. It can be completely removed from all answer files ever created with Windows SIM.

    It does no harm if left in place, it's just that it is not needed nor required.
    Post amended, and tidied up.

    I would appreciate somebody giving it a crack. I had one minor issue - after I created new install.wim and copied it to sources folder on a flashdrive, I tried to create a bootable iso for a Hyper-V VM and I have always use imgburn to do this, selecting option to make iso bootable, pointing to etfboot.bin.

    For some reason, the iso just would not boot in 1803.

    I got round it by using dism to do a clean install to a vhd (having created vhd in hyper-v first to ensure I had all the required partitions) but it is a bit of a faff doing it this way.
      My ComputerSystem Spec


  6. Posts : 13,955
    Windows 10 Pro
       1 Week Ago #6

    cereberus said: View Post
    I had one minor issue - after I created new install.wim and copied it to sources folder on a flashdrive, I tried to create a bootable iso for a Hyper-V VM and I have always use imgburn to do this, selecting option to make iso bootable, pointing to etfboot.bin.

    For some reason, the iso just would not boot in 1803.

    Two Microsoft / Windows native methods to make ISO, instead of using ImgBurn: Start with Deployment and Imaging Tools Environment as told in Part Five in this tutorial: Create Windows 10 ISO image from Existing Installation | Windows 10 Tutorials

    (You should have Deployment and Imaging Tools Environment installed because you have WSIM / ADK installed.)

    Then, try my PS script to make bootable USB flash drive: PowerShell Scripting - Create USB Install Media for Windows 10 | Windows 10 Tutorials

    Kari
      My ComputerSystem Spec

  7.    1 Week Ago #7

    Kari said: View Post
    Two Microsoft / Windows native methods to make ISO, instead of using ImgBurn: Start with Deployment and Imaging Tools Environment as told in Part Five in this tutorial: Create Windows 10 ISO image from Existing Installation | Windows 10 Tutorials

    (You should have Deployment and Imaging Tools Environment installed because you have WSIM / ADK installed.)

    Then, try my PS script to make bootable USB flash drive: PowerShell Scripting - Create USB Install Media for Windows 10 | Windows 10 Tutorials

    Kari
    Thanks - I remember this now from a while back. I will give it a crack again.
      My ComputerSystem Spec

  •    6 Days Ago #8

    Screen dump

    Click image for larger version. 

Name:	S.PNG 
Views:	51 
Size:	36.6 KB 
ID:	188675
      My ComputerSystem Spec

  •    6 Days Ago #9

    Kari said: View Post
    Two Microsoft / Windows native methods to make ISO, instead of using ImgBurn: Start with Deployment and Imaging Tools Environment as told in Part Five in this tutorial: Create Windows 10 ISO image from Existing Installation | Windows 10 Tutorials

    (You should have Deployment and Imaging Tools Environment installed because you have WSIM / ADK installed.)

    Then, try my PS script to make bootable USB flash drive: PowerShell Scripting - Create USB Install Media for Windows 10 | Windows 10 Tutorials

    Kari
    I used the first method and it worked perfectly. I am puzzled why imgburn failed though but hey, not an issue anymore!
      My ComputerSystem Spec

  •    5 Days Ago #10

    Kari said: View Post
    Two Microsoft / Windows native methods to make ISO, instead of using ImgBurn: Start with Deployment and Imaging Tools Environment as told in Part Five in this tutorial: Create Windows 10 ISO image from Existing Installation | Windows 10 Tutorials

    (You should have Deployment and Imaging Tools Environment installed because you have WSIM / ADK installed.)

    Then, try my PS script to make bootable USB flash drive: PowerShell Scripting - Create USB Install Media for Windows 10 | Windows 10 Tutorials

    Kari
    Hi, I added an optional extra step how to create a bootable iso (and copied one of your pictures).

    Cheers C.
      My ComputerSystem Spec


  •  
    Page 1 of 2 12 LastLast

    Related Threads
    Here is a quick guide how to run ubuntu 18.04 in enhanced mode in Hyper-V. EDIT: This has now been modified for release version. Please guys, do not add any comments about Virtualbox or VMware being better. Start a new thread if you wish to...
    Can Not Install W10 in UEFI Mode in Installation and Upgrade
    Hello, This is my first post here. Just joined TenForums. I`m having a problem trying to install W10 in UEFI mode. It keeps installing in Legacy mode. Is there a setting that needs to be changed in the UEFI BIOS? Also it takes too long for the...
    How can I install w10 in uefi mode in Installation and Upgrade
    Hi guys, I made a mess installing w10 in legacy bios mode, while I saw already running w8 in uefi mode. I'm actually on a w10 system with legacy bios mode. How can I install w10 in uefi mode, if bios won't start the installation of w10 using an...
    After searching through multiple threads I am seeing assistance at all levels on what to do when errors and BSODs occur during or after installing Win10. This is relative to ISO or upgrades, all inclusive. As I have NOT installed Win10 on any of...
    Solved W10 install in UEFI mode in Installation and Upgrade
    When I receive the Windows 10 download on July 29th or whenever they send it to me, I want to install it in UEFI mode. I am using Windows 8.1 64 bit currently and it is installed in BIOS mode. (Long story, I've never been willing to clean install...
    Our Sites
    Site Links
    About Us
    Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 18:30.
    Find Us