Add Applications in Answer File Windows 10

Page 2 of 2 FirstFirst 12

  1. Posts : 4,176
    Windows 11 Pro, 24H2
       #11

    In my research, I keep seeing notes from Microsoft that the documentation regarding some of these features is no longer being updated and that the OSes that these sections apply to seem to end with Windows 8.1. I'm not giving up quite yet, but I'm getting a little discouraged at this point.

    I already have a solution for handling Windows updates (I inject them into the Windows image). Likewise, I have a solution for handling drivers. The only part that I don't have an alternative for is the installation of applications (other than through a customized, sysprep image).

    I'll keep looking into this, but it's not looking too good right now.
      My Computers


  2. Posts : 911
    Windows 7
       #12

    I don't use WSIM, because editing the answer file can be faster. For reference:
    https://learn.microsoft.com/en-us/wi...an-answer-file

    This XML block has the same role as running "pnpunattend", searching a network Distribution share for matching drivers. You provide the same credentials as you would for "net use".
    Code:
      <settings pass="windowsPE">
        <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="1" wcm:action="add">
                <Path>\\MyServer\DriversFolder</Path>
                  <Credentials>
                     <Domain>MyDomain</Domain>
                     <Username>MyUsername</Username>
                     <Password>MyPassword</Password>
                  </Credentials>
            </PathAndCredentials>
          </DriverPaths>
        </component>
      </settings>

    If you have target PC's that don't have OEM licenses in BIOS, then writing a SetupComplete.cmd script to install your post-setup apps is much easier since Windows will detect its presence and run it. However, if your target PC's do have OEM licenses, you will be forced to use Synchronous Commands in the specialize pass.
      My Computer


  3. Posts : 4,176
    Windows 11 Pro, 24H2
       #13

    garlin,

    If I read that correctly, this is only for boot-critical drivers, is that correct? Is it possible to do some similar for the full compliment of drivers for the system?

    The manner in which I am currently handling this is to first export all the drivers like this:

    pnputil /export-driver * D:\DriversForSystemX

    Then, after installing Windows I run another similar command that installs all the drivers.

    As an alternative, I inject all the drivers into my Windows image.

    However, I would be curious to know if I could do this through the unattended answer file as well.
      My Computers


  4. Posts : 911
    Windows 7
       #14

    If you wanted to specify a driver folder search path for PNPunattend:
    Code:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" /v Path /t REG_SZ /d "C:\Drivers"
    pnpunattend.exe AuditSystem /L

    There is a wrinkle, in that you CANNOT guarantee which drive letter your DVD or USB device is mounted.

    Either you have to run a wrapper script to search every possible drive letter for your matching folder, and only name it -- OR -- the kludge of adding every drive letter, so PNPunattend searches them in order. A non-existent path won't stop it from searching the next registry entry 1...[n].

    Code:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" /v Path /t REG_SZ /d "D:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\2" /v Path /t REG_SZ /d "E:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\3" /v Path /t REG_SZ /d "F:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\4" /v Path /t REG_SZ /d "G:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\5" /v Path /t REG_SZ /d "H:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\6" /v Path /t REG_SZ /d "I:\Drivers"
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\7" /v Path /t REG_SZ /d "J:\Drivers"

    What's also very cool is you can copy the extracted drivers to the ISO's root folder, instead of DISM integrating them. Since PNPunattend /L is recursive, it will scan all subfolders and only install matching drivers. Non-applicable drivers won't bloat your system's driver store.

    I believe the normal rules of driver precedence win if there are multiple-matching drivers. That is the "best fit" by vendor HW ID's and then by release date.

    - - - Updated - - -

    Forgot the answer file method:
    Code:
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="1" wcm:action="add">
                <Path>D:\Drivers</Path>
            </PathAndCredentials>
          </DriverPaths>
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="2" wcm:action="add">
                <Path>E:\Drivers</Path>
            </PathAndCredentials>
          </DriverPaths>
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="3" wcm:action="add">
                <Path>F:\Drivers</Path>
            </PathAndCredentials>
          </DriverPaths>
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="4" wcm:action="add">
                <Path>G:\Drivers</Path>
            </PathAndCredentials>
          </DriverPaths>
        </component>
      </settings>
      My Computer


  5. Posts : 4,176
    Windows 11 Pro, 24H2
       #15

    garlin,

    Thanks so much for the response. I'll have to try this out.

    Just to be make sure that I understand, tell me if this is correct:

    1) The entries in your post #12 or this thread apply to boot-critical drivers.

    2) Your post #14 applies to adding drivers to drivers to be installed into Windows proper.

    Is that correct?

    As for determining the drive letter, I have no idea whether this would work or not, but rather than specifying a drive letter, could the GUID (for example \\?\Volume{ad7a9d00-30c0-4461-8955-588cfe77c1c7}\) be used? I know that it is used in place of a drive letter in some locations within the registry, but I don't know if this is universally true anywhere in the registry.

    Even if that idea works for a USB disk, I'm not sure how that would work on a DVD or an ISO image (in the event one is mounting an ISO to install to a VM).
      My Computers


  6. Posts : 4
    Window 10 Professional
    Thread Starter
       #16

    Dear Sir,

    I have looked at that documentation provided by Microsoft and it doesn't involve steps, I'm finding the tutorials or videos for configuration set & Distribution Share who has done it using Windows System Image Manager GUI that I use to create Answer File.
      My Computer


  7. Posts : 911
    Windows 7
       #17

    Faysal said:
    I have looked at that documentation provided by Microsoft and it doesn't involve steps, I'm finding the tutorials or videos for configuration set & Distribution Share who has done it using Windows System Image Manager GUI that I use to create Answer File.
    More WSIM knowledge is on TechCommunity or other sites (like Experts Exchange), since it's highly specialized.
    The audience on TenForums & Elevenforums is mostly for consumer Windows.

    - - - Updated - - -

    hsehestedt said:
    Just to be make sure that I understand, tell me if this is correct:

    1) The entries in your post #12 or this thread apply to boot-critical drivers.

    2) Your post #14 applies to adding drivers to drivers to be installed into Windows proper.

    Is that correct?

    As for determining the drive letter, I have no idea whether this would work or not, but rather than specifying a drive letter, could the GUID (for example \\?\Volume{ad7a9d00-30c0-4461-8955-588cfe77c1c7}\) be used? I know that it is used in place of a drive letter in some locations within the registry, but I don't know if this is universally true anywhere in the registry.

    Even if that idea works for a USB disk, I'm not sure how that would work on a DVD or an ISO image (in the event one is mounting an ISO to install to a VM).

    WinPE pass also supports DriverPaths. If you needed boot-critical drivers, install them in WinPE pass otherwise the first boot into Windows would fail. You have the flexibility of DriverPaths in WinPE or specialize, or calling PNPunattend from SetupComplete at the end.

    I've never tried using a volume path GUID. You can test it on a live machine, since "pnpunattend /L" uses whatever is currently registered for DriverPaths.

    While I can see some might prefer scripting a "cleaner" solution to the drive letter, copy/pasting a sequence of "reg add" permutations is something that a non-programmer could follow with less confusion. In reality, the average person's system won't have as many extra disk volumes compared to a power user.
      My Computer


  8. Posts : 4
    Window 10 Professional
    Thread Starter
       #18

    Thank You Mr. Garlin for the response will check other website you mentioned, and coming to the answer file I use WSIM to prepare
    answer File for Windows 10 Image and it works Fine but I checked that there is way to add packages meaning updates that I was able to add, but the main concern was for adding applications like chrome, adobe, Nitro, office in answer file using WSIM. for the drivers I can use DISM or Pnputil to add in a offline image before using WSIM and have done it. And is There any WhatsApp IT Professional Group so i can be part of it ?
      My Computer


  9. Posts : 4,176
    Windows 11 Pro, 24H2
       #19

    Thanks for all the help, Garlin.
      My Computers


 

  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 02:52.
Find Us




Windows 10 Forums