none
Sysprep is removing Store Apps

    Question

  • Background

    Windows 10 v1607 Enterprise does not include BingNews, BingFinace, or BingSports built-in (it does have BingWeather). So, I used the Windows Store for Business to download the apps and provision them using:

    DISM /Online /Add-ProvisionedAppxPackage /PackagePath:C:\App1.appx /SkipLicense

    This works good, and the app is installed.  All users who logon get the app. 

    Problem

    When I sysprep the computer, it removes these apps and the resulting image doesn't have the apps preinstalled anymore.

    sysprep.exe /quiet /generalize /oobe

    Looking at the setupact.log, it seems sysprep removes all the appx programs.  I guess Windows reinstalls the built-in apps during first boot, but the ones I added are gone.

    Any ideas how to prevent this and keep the preloaded apps?  Maybe there's something I can do in unattend.xml I can pass to sysprep?


    -Tony

    Saturday, March 11, 2017 4:14 AM

Answers

  • Hi Tony, 

    It's designed by default about Sysprep feature. 

    See this:

    SYSPRP ActionPlatform::LaunchModule: Found 'SysprepGeneralize' in C:\Windows\System32\AppxSysprep.dll; executing it

    It appear that if there is Generalize function define in appxsysprep.dll file can be find, the action will be performed during generalize, the appx packaged added after successfully deploy system will be removed. 

    Thanks for your understanding. 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Tony MCP Tuesday, March 21, 2017 8:56 PM
    Monday, March 20, 2017 10:18 AM
    Moderator

All replies

  • Hi Tony,

    On my test machine with clean installed Windows 10 Enterprise, the BingNews, BingFinace, or BingSports are the build-in ones.

    I consider that your image file for Windows 10 installation previously can be customized to remove these apps, so, the Sysprep will remove them as expected.

    Try audit mode first to customize the image (add apps) and do the syspep generalize again.

    Another way is to customize a offline image, then, deploy the Upgrade to implement what you would like.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Monday, March 13, 2017 3:59 AM
    Moderator
  • Hi Tony,

    On my test machine with clean installed Windows 10 Enterprise, the BingNews, BingFinace, or BingSports are the build-in ones.

    I was not able to confirm this.  In fact, I was able to confirm they are not included in the latest ISO from Microsoft:

    I downloaded Windows 10 Enterprise, Version 1607 (Updated Nov '16) 64 Bit English from the Microsoft Volume Licensing Service Center.  I install the ISO on a clean machine.  News, Finance, nor Sports are installed.

    Furthermore, if I mount the install.wim and use Get-AppxProvisionedPackage, those appx are not listed.

    I consider that your image file for Windows 10 installation previously can be customized to remove these apps, so, the Sysprep will remove them as expected.

    Hmm, the ISO came directly from Microsoft, so I doubt it.

    Try audit mode first to customize the image (add apps) and do the syspep generalize again.

    Another way is to customize a offline image, then, deploy the Upgrade to implement what you would like.


    So, do my customizations as usual, do audit mode, install appx, then do generalize?


    -Tony

    Monday, March 13, 2017 8:53 PM
  • Hi Tony, 

    Here's the results on my Enterprise image: 

    I have tested the Audit mode, and you are right, the generalize could be failed. Sorry to give your the incorrect direction. 

    What about use first logon Script for install the appx files? But I haven't have time to test this: 

    sysprep by using an  unattend file with this first logon script

    https://msdn.microsoft.com/en-us/windows/hardware/commercialize/customize/desktop/unattend/microsoft-windows-shell-setup-firstlogoncommands

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Tuesday, March 14, 2017 11:13 AM
    Moderator
  • Thank you for taking time to assist me with this.

    Hi Tony, 

    Here's the results on my Enterprise image: 

    Clearly, you have the Bing appx packages on your PC; maybe your PC was deployed as 1511 and upgraded to 1607, or you used older 1607 installation media.  I don't know.

    I can confirm they are not included on the Windows 10 Enterprise, Version 1607 (Updated Nov '16) 64 Bit English download from the Microsoft Volume Licensing Service Center.(SW_DVD5_WIN_ENT_10_1607.1_64BIT_English_MLF_X21-27030.ISO)

    If they were included, I wouldn't need to re-add them. :-)  (Maybe you know of a better download location)

    Anyway...

    Is it possible to add provisioned apps to the installation, then sysprep it?

    What about use first logon Script for install the appx files? But I haven't have time to test this: 

    sysprep by using an unattend file with this first logon script.

    I know I can do, uh, "hacks" like this.  But this is only necessary to work around not being able to simply add the apps to the syspreped image.

    Can you tell me if there is anyway to add provisioned apps to an installation and then sysprep it?  This would be the most straightforward and simple approach, yes?

    Thank you for your help!


    -Tony

    Tuesday, March 14, 2017 7:43 PM
  • Hi,

    Would you please upload the sysprep log for my research?

    In addition, we can use WICD to customized the install.wim and add Applications in this item:


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 15, 2017 2:11 AM
    Moderator
  • Hi,

    Would you please upload the sysprep log for my research?

    In an attempt to create an easy-to-reproduce environment for you, here's what I did:

    1. Boot from the SW_DVD5_WIN_ENT_10_1607.1_64BIT_English_MLF_X21-27030.ISO file in a new, clean VM
    2. Installed Windows, accepted all defaults
    3. Loaded BingNews, BingFinance, BingSports using:
      DISM /Online /Add-ProvisionedAppxPackage /PackagePath:C:\App1.appxbundle /SkipLicense
    4. Sysprep: sysprep /generalize /oobe /quit
    5. Reboot, logon.  The appx's I installed are gone.

    The setupact.log file has been uploaded here: https://1drv.ms/u/s!Akn0CBCbpV2vhKYt1p2PZdZOzo3zsg

    Around line 1120, sysprep begins uninstalling all appx packages.

    Hi,

    In addition, we can use WICD to customized the install.wim and add Applications in this item...

    Hmm.  I guess I could either modify the wim file provided by Microsoft in the ISO, or modify the wim file of the image after I sysprep the computer.

    But, this all seems unnecessary.  If I install the apps and sysprep the computer, why does it remove those apps?

    This website, Sysprep (Generalize) a Windows installation, documents how to sysprep with Store Apps, but never states they will be removed.

    Is there anyway to add provisioned apps to an installation and then sysprep it?

    Thanks again for your help with this.


    -Tony

    Wednesday, March 15, 2017 10:39 PM
  • Hi Tony, 

    It's designed by default about Sysprep feature. 

    See this:

    SYSPRP ActionPlatform::LaunchModule: Found 'SysprepGeneralize' in C:\Windows\System32\AppxSysprep.dll; executing it

    It appear that if there is Generalize function define in appxsysprep.dll file can be find, the action will be performed during generalize, the appx packaged added after successfully deploy system will be removed. 

    Thanks for your understanding. 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Tony MCP Tuesday, March 21, 2017 8:56 PM
    Monday, March 20, 2017 10:18 AM
    Moderator
  • Sorry to bring up a months old thread.

    You mentioned that the Generalize phase removes the Provisioned Appx applications...

    So if we don't run the Generalize, it won't remove the apps?
    Monday, November 6, 2017 6:58 PM