Create media for automated unattended install of Windows 10  

Page 61 of 99 FirstFirst ... 1151596061626371 ... LastLast

  1. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #600

    Thanks for the write up - that definitely helps.

    Based upon your first 2 answers, as soon as we use a custom file for Pass 1, all of that goes out the window, then, and we're forced to make all of these partitions manually. Correct?

    Reason I ask is that when using a regular Windows 10 install tool, there is some sort scheme being used to set up everything - the computer I just built and used an MCT generated install USB created the following with 0 customization to the USB - I didn't even do my traditional Moving of \Users tree to a separate HD (see this tutorial: Move Users Folder Location in Windows 10) because this is all a temporary install until I get a true HyperVisor installed on the machine and make VMs for all the different OSs I want to use as guests in that. But this is the partition scheme that it created:

    Create media for automated unattended install of Windows 10-default-windows-10-install.png

    So, my (apparently incorrect) rationale was that if you don't specify the information in the answerfile under Pass1, then it just makes what it would normally make. Oh well.

    So, now I need to collate all of this info together, from the original tut, my modifications to my own answer file, and our subsequent discussion over the last couple of days to get this all into a working single package, that I can then image into a few USB drives and do some mad installs (versus using a PXE boot and image through something like CloneZilla, as these machines are not isolated from the live testing computers, and the last thing I want is to accidentally cause issues like IP address conflicts on reboot that take down someone taking a live test.

    I was hoping this would be an easy fix to get all the little things like partitions, UWP app removal and the little Customization all fixed in one go. But since I'm using VMs now, I can play and experiment and see what happens. So that is exactly what I am going to do.
      My Computers


  2. Posts : 4,163
    Windows 11 Pro, 22H2
       #601

    Not sure I understand the first question entirely but let me take my best stab at this:

    If you remove the disk configuration section BUT you have the script in place to perform the partitioning AND your answer file still specifies where Windows should be installed (disk 0, partition 3 as an example), then the installation will still be entirely automatic and you will not need to intervene manually. In other words, you will not need to partition anything manually.

    When you install from a USB drive that has a standard Windows distribution on it, recall that Windows will stop at a screen that shows you the available disk drives. From that screen, you can delete partitions, create partitions, load drivers, etc. If you delete all partitions on a drive and then tell Windows to install on that drive, then, yes, Windows will create all the partitions that it needs. But note that you had to choose the drive to install on. If Windows simply made assumptions, it might accidentally pick a drive that has important data on it or that you intended to use for other purposes so it will make no assumption on what drive to use.

    With an answer file, you are telling Windows how to configure the drive so it doesn't have to stop and check with you.

    In our case, we are working around the limitation in the answer file of not being able to shrink the Windows partition to make room for the recovery partition at the end by using a script to get around this limitation.

    Note that if you don't use the script, the only limitation is that the recovery partition cannot be resized by Windows since it is sitting between two other partitions. That could possibly be an issue in future upgrades if more space is needed.

    Personally, that's not normally an issue for me because I typically do clean installs of Windows rather than upgrades, and I also don't care if I even have a recovery partition since I always have recovery media on hand. I'm just doing this more as a learning exercise and because I'm being picky and wanting everything configured flawlessly

    BTW, your point about VMs is a good one. I take snapshots (checkpoints in Hyper-V terms) at every important step so that I can replay / modify / experiment, without having to start all over all the time. I don't know how I could possibly get along without my VMs .

    Please just let me know if I can help any further. I enjoy playing with this stuff .
      My Computers


  3. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #602

    hsehestedt said:
    Quick question: What hypervisor do you use? I use your method for Hyper-V, but if you use VMware Workstation, it's even easier. Simply install the VMware tools and then you can simply drag and drop files right onto the VM.
    Windows 10 Native Hyper-V.
      My Computers


  4. Posts : 4,163
    Windows 11 Pro, 22H2
       #603

    Hyper-V is perfectly good. I just like VMware because I've been using it since way before Hyper-V was included with Windows. I'm just so familiar with it.
      My Computers


  5. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #604

    hsehestedt said:
    Not sure I understand the first question entirely but let me take my best stab at this:

    If you remove the disk configuration section BUT you have the script in place to perform the partitioning AND your answer file still specifies where Windows should be installed (disk 0, partition 3 as an example), then the installation will still be entirely automatic and you will not need to intervene manually. In other words, you will not need to partition anything manually.

    When you install from a USB drive that has a standard Windows distribution on it, recall that Windows will stop at a screen that shows you the available disk drives. From that screen, you can delete partitions, create partitions, load drivers, etc. If you delete all partitions on a drive and then tell Windows to install on that drive, then, yes, Windows will create all the partitions that it needs. But note that you had to choose the drive to install on. If Windows simply made assumptions, it might accidentally pick a drive that has important data on it or that you intended to use for other purposes so it will make no assumption on what drive to use.

    With an answer file, you are telling Windows how to configure the drive so it doesn't have to stop and check with you.

    In our case, we are working around the limitation in the answer file of not being able to shrink the Windows partition to make room for the recovery partition at the end by using a script to get around this limitation.

    Note that if you don't use the script, the only limitation is that the recovery partition cannot be resized by Windows since it is sitting between two other partitions. That could possibly be an issue in future upgrades if more space is needed.

    Personally, that's not normally an issue for me because I typically do clean installs of Windows rather than upgrades, and I also don't care if I even have a recovery partition since I always have recovery media on hand. I'm just doing this more as a learning exercise and because I'm being picky and wanting everything configured flawlessly

    BTW, your point about VMs is a good one. I take snapshots (checkpoints in Hyper-V terms) at every important step so that I can replay / modify / experiment, without having to start all over all the time. I don't know how I could possibly get along without my VMs .

    Please just let me know if I can help any further. I enjoy playing with this stuff .

    Lol - it's always the little things - you're right, there is user interaction in terms of the installation with the HD - I, myself, when using a generic WinX install, always get to the install / upgrade screen, then SHIFT-F10 a CMD window open to use diskpart to select the drive I want to install on, clean it and convert it to gpt and exit, then select the drive and click Next, allowing Windows itself to set up the partitions. And thus far it has been fine - but this takes it to a completely different level, in terms of not having to do anything at all - but it still is a PITA that you can't just do a scripted version of what I do and not have to actually specify all of the parameters using the script.

    Oh well.

    I'm planning on playing with ti a bit, trying to see if I can remove apps and have them remain removed (I really doubt anyone coming to take a certification test is going to play Candy Crush, yanno?)
    I have found a couple of other pages not related to tenforums regarding that mess, particularly Rod Smith's pages, and as he does this same type of custom install setup, I'm reading more info over there as well. Now that I can run VMs easily (gobs of cores, gobs of RAM) I have a lot more I can do in terms of (testing and) playing.
      My Computers


  6. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #605

    So, interestingly enough, after the OS fully boots in to the newly set up OOBE generalized setup, if you have enabled Guest services in Integration services for the VM, as well as Enhanced Session Mode Policy (for server) and Enhanced Session Mode (for user), then you should, theoretically, be prompted with a VMConnect-like dialog box allowing you to share local resources with the VM, and be able to copy files directly (you can also set up audio sharing, printers, etc....

    Create media for automated unattended install of Windows 10-vm-local-resource-sharing.png

    So that solves the part about needing to share folders. Of course, this does not (seem to) work when you're in audit mode, so copying files from localhost to VM still needs the alternate method(s) - for me, I'll stick to the .ISO method.
      My Computers


  7. Posts : 4,163
    Windows 11 Pro, 22H2
       #606

    So that's interesting. With VMware I can install the VMware tools and they all work fine in Audit mode making it possible for me to copy and paste in both directions between the host and the guest OS.
      My Computers


  8. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #607

    Yeah. For some reason it doesn't kick in on Hyper-V. I do remember that on both VMWare and VBox, this was possible as soon as you installed the guest addons in each. In Hyper-V there doesn't seem to be a method of installing anything, it simply detects both the Host OS and the installed OS before granting the abilities.

    I was actually looking at this link and as I read through it a second time, thinking I would implement the internal switch method for the future (which, theoretically, should work whenever an OS is active, even in audit mode - I'll test today for sure) and then I realized that something was wrong with the concept because I had transferred files before, specifically using RDC into my VMs which allowed local resources. So I verified all my settings were right for a new instance of a VM and only when it completed the generalized OOBE pass and logged in with an account that I created did the ability to show the loca resources automatically pop up.
    Last edited by johngalt; 11 Sep 2020 at 10:12. Reason: Added actual URL for link
      My Computers


  9. Posts : 2,667
    Windows 11 21H2 (22000.593)
       #608

    Oh - before I forget - the detailed steps to make sure local resources will be available when using 'approved' OSs for hosts and guests:

    Use local resources on Hyper-V virtual machine with VMConnect

    And from our own tutorials here:

    Turn On or Off Hyper-V Enhanced Session Mode in Windows 10

    Handy.
    Last edited by johngalt; 11 Sep 2020 at 10:20. Reason: Added Our own tutorial here also
      My Computers


  10. Posts : 4,163
    Windows 11 Pro, 22H2
       #609

    @johngalt, just thought that you might be interested in a potential problem I've run into.

    As noted before, I tested the whole procedure that we have been discussing with a VM and all works flawlessly. Today, I wanted to test on a physical machine. The only machine I was really willing to wipe today is an older HP laptop but it does have UEFI firmware.

    I started the unattended installation from a thumbdrive but when it gets to the point in the installation where it should start copying files I get the following error message:

    The partition selected for installation (3) does not exist on disk 0. Make sure the unattend answer file's <ImageInstall> setting references a valid partition on this computer, and then restart the installation.

    To investigate, I open a command prompt and run diskpart and all 4 of the partitions are there and appear to be absolutely correct.

    Here is where it gets really interesting:

    I remove the answer file and reboot. This has the effect of forcing me to manually install Windows.

    When it get to the point selecting the location to which I should install Windows, I select partition 3 (the partition that a moment ago it claimed does not exist) and the installation proceeds flawlessly.

    I need to try this on a newer system, it's just a PITA simply because I'll have to restore my entire current installation from a backup after testing since this is a destructive test.

    Just thought I'd let you know what I ran into for now.

    Oh, one last thing: I modified my script just slightly so it puts messages up on the screen and I can see that it does run successfully. I even added one more command at the end of diskpart (a rescan), to try to make sure that Windows would see all the partitions after they were created but on this one system it still complains.

    Investigating further, will update with any new info, but I strongly suspect some oddity with this particular system.
      My Computers


 

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 08:45.
Find Us




Windows 10 Forums