Create media for automated unattended install of Windows 10  

Page 13 of 98 FirstFirst ... 311121314152363 ... LastLast

  1. Posts : 4,169
    Windows 11 Pro, 22H2
       #120

    Kari, as requested, here is the link to the other tutorial:

    https://www.windowscentral.com/how-create-unattended-media-do-automated-installation-windows-10

      My Computers


  2. Posts : 4,169
    Windows 11 Pro, 22H2
       #121

    I've been able to follow the tutorial to create a completely customized Windows Unattended Install.
    I have one thing that I would like to add:

    I noticed that when you logon the first time, you still have to wait a little while while Windows says "Hi" and completes some final preparations.

    You can configure the unattended install to autologon just 1 time to allow this to complete automatically.
    To configure Windows to automatically logon 1 time so that setup can run to completion, do the following:

    Add amd64_Microsoft-Windows-Shell-Setup to 7 oobe System

    On the right side, select AutoLogon and configure the following settings:

    Enabled: true
    LogonCount: 1
    Username: <the admin username you configured earlier>

    Expand AutoLogon, select Password, and enter your password for Value on the right side.

    Important note regarding LogonCount known issue (from Microsoft docs):

    Please note that there is a known issue which causes Windows to add 1 to the LogonCount value, if that value is greater than 0. When setting LogonCount, enter a number that is one fewer than the number of automated logons you desire. For example, to facilitate 2 automated logons, set LogonCount to 1.

    If LogonCount is 0, Windows correctly interprets this and will not perform any automated logons. Because of this known issue, the LogonCount Unattend setting cannot be used to allow exactly one automated logon. To work around this known issue, take the following steps:

    1. Set LogonCount to 1.
    2. Add a new command under the

    Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand Unattend setting for the oobeSystem pass:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f
      My Computers


  3. Posts : 4,169
    Windows 11 Pro, 22H2
       #122

    When I setup the reference system I know that I can install destop aps, Windows updates and I can change personalization settings and all of this is applied when I install a new machine in unattended mode with the image created from this system. However, I notice that any Windows store apps that I had updated while in audit mode are gone and need to be updated all over again.
    Does anyone know if there is a way to maintain Windows store apps in an image so that these do not all need to be updated again after an unattended setup?
      My Computers


  4. Posts : 4,169
    Windows 11 Pro, 22H2
       #123

    Sharing What I Have Learned


    Kari, a word of thanks once again for the fantastic tutorial. It's really inspired me and I've learned a few things along the way that I wanted to share with everyone.

    Item 1
    I've learned that if all you want to do is create a simple unattended installation and you don't need to create a sysprepped image, you can just create the autounattend.xml and skip the whole process of creating the second unattend.xml answer file. If you do this, then you need to incorporate the pass 7 settings into that autounattend.xml answer file. This method also requires no reference system. Details can be found here:

    How to create an unattended installation of Windows 10 | Windows Central

    Item 2
    Using the tutorial in this thread, when you setup a system with the unattended installation media that you have created, Windows installation will proceed to the point where you logon for the first time. However, during that first time logon it takes another couple of minutes for setup to complete because you you get the screens that say things like "Hi", "We're setting everything up for you", "This may take a few minutes", "Almost done", etc.

    If you want to automate this then you can add a one time autologon / logoff as follows:

    If you are using the single answer file method as noted above in item 1, make these additions to the autounattend.xml answer file. If you are following the steps in the tutorial in this thread, then make these additions to the unattend.xml answer file.

    From the Windows Image pane in Windows System Image Manager, expand Shell-Setup. Add both AutoLogon and FirstLogonCommands to Phase 7 oobe System. Select AutoLogon and set the following values:

    Enabled: true
    LogonCount: 1
    Username: <Use the admin username you created>

    Expand AutoLogon and select Password

    Set "Value" to the password for the username you just specified.

    Now, you need to be aware that there is bug with how AutoLogon is handled. AutoLogon erroneously adds 1 to LogonCount value. As a result, you have to subtract 1 from the number of times you want it to logon. So to logon once, you have to make the LogonCount 0. Unfortunatly, windows does properly recognize a LogonCount of 0 as meaning Never AutoLogon. So to correct this we have to make the LogonCount 1 and then use the registry entry in the step below:

    Right click on FirstLogonCommands in the Answer File pane and select Insert New SynchronousCommand.

    Select SynchronousCommand add set the following values:

    CommandLine: reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f
    Order: 1

    Optional: After setup completes, if you want Windows to automatically log you off so that you are back at the logon screen, we need to add one single line into the middle of the RunOnce.bat file referenced in the tutorial.

    As a reminder, that file looked like this:

    echo Y | del %appdata%\microsoft\windows\recent\automaticdestinations\*
    del %0

    Modify it so it now looks like this:

    echo Y | del %appdata%\microsoft\windows\recent\automaticdestinations\*
    shutdown /l
    del %0

    Note: If you are adding this functionality to the unattend.xml file it will also affect your Reference system. At the point where you have completed creating the image file on the Reference system and you reboot normally, the reference system will logon, complete the setup, then logoff. Simply log back on to it at this point.

    I hope that this is useful!

    - Hannes
      My Computers


  5. Posts : 7
    Windows 10 Home
       #124

    Hi Kari
    I have some issues with creating a USB-Flashdrive. I did it with your Powershell script. But whatever I do it doesn't work.
    I created a folder C:\ISO_File (with Windows 10 install files copied from original ISO, install.wim in Sources folder replaced with custom one, Custom autounattend.xml answer file to take care of Windows setupCreate media for automated unattended install of Windows 10-iso-file.pngCreate media for automated unattended install of Windows 10-install.png.
    When I run the ps1 Script I first mounted an original W10 ISO with the letter F. Then I ran the script. But then my ISO-File Folder is unattached. When I ran it with C:\ISO-File but that didn't copy the install.wim File because it is to big. I also tried rufus according to a commend I found, but that didn't work either. So now I tried for 4h and I'm at my wit's end. The whole tutorial was so good. But the last part left my in the dark......
    Thank you for your answer
      My Computer


  6. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #125

    emmapeel6490 said:
    I have some issues with creating a USB-Flashdrive. I did it with your Powershell script. But whatever I do it doesn't work.
    The problem is that FAT32 file system used in USB install media has a file size limit of 4 GB. The custom WIM images are usually bigger, so they cannot be copied to FAT32 formatted USB flash drive.

    Luckily, there are workarounds. For instance, you can create a USB flash drive which contains a FAT32 formatted bootable partition, and an NTFS formatted partition to store Windows installation files. See this tutorial for instructions: Create bootable USB installer if install.wim is greater than 4GB | Windows 10 Tutorials

    Another option is to split large install.wim file to smaller files, and install / deploy Windows 10 using DISM. More in this tutorial: DISM - Split install.wim file | Windows 10 Tutorials

    Kari
      My Computer


  7. Posts : 7
    Windows 10 Home
       #126

    What goes where?


    Thank you for your quick answer.
    I tried the one (Create bootable USB installer if install.wim is greater than 4GB) but what I quit don't understand is, which file goes where?
    FAT = boot.wim
    NTFS = EFI, SOURCES with customised install.wim, support, autorun.inf, bootmgr, bootmgr.efi, setup.exe, autounattend.xml?
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #127

    emmapeel6490 said:
    Thank you for your quick answer.
    I tried the one (Create bootable USB installer if install.wim is greater than 4GB) but what I quit don't understand is, which file goes where?
    Just follow the instructions in that tutorial. In its step 4 you will copy your custom install.wim file to folder you created in its step 1. Following the tutorial, USB will be created automatically, you do not have to think where the files go.

    When USB is created, copy your answer file autounattend.xml to USB partition labelled USB-FAT32.

    If you have any issues with getting the USB created as instructed, post your questions on that tutorial thread.

    Kari
    Last edited by Kari; 31 Oct 2018 at 16:32. Reason: Fixed some typos
      My Computer


  9. Posts : 2
    Windows 10
       #128

    Hi Kari, I think the article title is misleading or you have misunderstood something. The article is very detailed, but it is not the best and easiest way to automatize Windows installation. You just need one unattend.xml file with both WinPE and OOBE steps included (CopyProfile is not needed at least). Put in somewhere where the windows installation program can find it (i.e. USB stick) and boot the computer from the installation media. If the installation media is a USB stick, the XML file can be put in the root folder of the stick.

    Your very detailed process is more oriented to create a custom unattended installation of Windows. I have seen some old tutorial from Microsoft where they use the same method but it was meant to create custom installations. And Imho the best way to do this is just boot to Windows Audit mode manually, make your customizations and then Sysprep using the second answer file you created.

    So, just to be clear, if you just want to install a normal Windows automatically:
    1) Create an answer file that includes both WinPE and OOBE parts and save it as unattend.xml
    2) Copy the XML file to an USB stick. If your Windows installation media is already in an USB stick, just copy the XML file to the root folder of the stick
    3) Boot the machine where you want to install Windows, from whatever installation media you are using and make sure that the XML file is also there (in the same USB stick as Windows or in it's own one if you are installing from DVD)

    Cheers,

    Christian
      My Computer


  10. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #129

    cfinnberg said:
    Hi Kari, I think the article title is misleading or you have misunderstood something.
    I think that you might have misunderstood something. In the process told in this tutorial, CopyProfile is an essential setting.

    The purpose of this tutorial is not to show how to automate Windows installation. The purpose is to show how to customize Windows and capture it to a custom image, a WIM file, automating then the complete Windows setup. For this, the method with two answer files is the easiest one. First one helps to get all customizations to custom image, second one then takes care of partitioning and Windows setup.

    Kari
      My Computer


 

Tutorial Categories

Create media for automated unattended install of Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
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 22:42.
Find Us




Windows 10 Forums