Page 1 of 3 123 LastLast
    Provisioning Package - Create in Windows 10

    Provisioning Package - Create in Windows 10

    Create Custom Provisioning Package used to Reset Windows 10 or Create Recovery Drive
    Published by
    2015-08-02
    Designer Media Ltd

    Published by

    VIP Member

    Posts: 928

    Show Printable Version 


    Create Custom Provisioning Package used to Reset Windows 10 or Create Recovery Drive

    information   Information
    If you're having problems with Windows 10 on your PC, in some cases you may want to reset it or use a recovery drive which you have created.

    If you have upgraded a computer from an earlier version of Windows, or clean-installed it yourself at some point, then normally a reset or a recovery drive will perform a clean install of Windows 10 and nothing else.

    However this tutorial shows you how to customise the reset and recovery drive by saving your currently installed software applications, so that they get picked up by the reset process or the next time you create a recovery drive.

    Windows 10 incorporates a new technology called Provisioning Packages, and this tutorial uses tool called scanstate, which is part of the free Windows Assessment and Deployment Kit (ADK) to capture currently-installed software into one of these packages.

    Note   Note
    You must be signed in as an administrator to be able to perform this tutorial

    It's best to run this computer soon after setting it up, when you know you have software that's working correctly. This tutorial preserves the state of your currently installed software (although it seems not to save settings). If your software is currently not working, then this tutorial may just preserve the broken state of your current computer, which means a future Reset would not help you.

    The other reason to do this on a freshly set up PC is that the provisioning package seems to include other folders on your operating system drive, outside the C:\Users folders. So if you have a folder called C:\Software_Installers, that gets included as well. This can be useful but also can swell the size of the package if you have saved a lot of files outside the C:\Users folder.

    warning   Warning
    This tutorial uses the same techniques which manufacturers of new Windows 10 computers are likely to be using to save customisations.

    Therefore it is not intended for use on computers which came with Windows 10 pre-installed, as it may conflict with customisations which the manufacturer has already saved.

    This tutorial writes a file to a folder called C:\Recovery\Customizations. This folder is a 'special' Windows folder and you can break Windows Reset and Recovery processes by putting the wrong file there.



    A video walk-through of this process, with one or two variations, and showing testing of the Reset and Recovery Drive process:





    Here's How:

     Contents:

    Part One: Check for existing saved customisations
    Part Two: Download the USMT from the ADK
    Part Three: Prepare the scanstate tool and capture customisations




    Provisioning Package - Create in Windows 10 Part One Provisioning Package - Create in Windows 10
     Check for existing saved customisations

    1. Open an elevated command prompt.

    2. Type the following command and press enter:

    dir c:\Recovery\Customizations /a

    3. If this directory listing returns a file (see screenshot below), then there are customisations already present. If the file is present because you already ran this tutorial previously, then you should be OK. However if you didn't run this, then it looks like the manufacturer has already saved customisations and you should not run the rest of this tutorial.

    Click image for larger version. 

Name:	RecoveryExists_Bad.png 
Views:	318 
Size:	31.0 KB 
ID:	27770

    If the directory doesn't exist, or is empty (for example as in the screenshot below) you should be good to continue with the rest of the tutorial.

    Click image for larger version. 

Name:	RecoveryDoesntExist_Good.png 
Views:	235 
Size:	19.6 KB 
ID:	27771

    4. Type exit and press Enter, to close the command prompt window.





    Provisioning Package - Create in Windows 10 Part Two Provisioning Package - Create in Windows 10
     Download the USMT from the ADK

    5. This section installs part of the Windows Assessment and Deployment Kit (ADK), called the User State Migration Tool (USMT). To do this, click on the download button below to download the Setup program for the ADK. Save this on your computer and Run it once it has downloaded.

    download


    6. The ADK setup program will ask if you want to Install the Windows Assessment and Deployment Kit to this computer, or Download for installation on a separate computer. All you need to do for this tutorial is select the Install option, and click/tap next.
    information   Information
    Optional: If you like, you could select the Download option to download the whole ADK to use other tools within the kit. This will result in a bigger data download than the minimum required for this tutorial.

    Click image for larger version. 

Name:	ADK_InstallOrDownload_a.png 
Views:	276 
Size:	31.2 KB 
ID:	27772


    7. The ADK setup program will ask you if you are happy for anonymous usage data to be collected. Answer this question by selecting Yes or No, and then click/tap Next.

    Click image for larger version. 

Name:	ADK_Privacy_a.png 
Views:	226 
Size:	35.6 KB 
ID:	27774


    8. The ADK setup program will ask you if you accept the licence agreement. If you are happy to accept this, then click/tap Accept.

    Click image for larger version. 

Name:	ADK_LicenseAgreement_a.png 
Views:	283 
Size:	49.0 KB 
ID:	27775


    9. The ADK setup program will ask you which features you want to install. For the purpose of this tutorial, the only feature required to be selected is the User State Migration Tool (USMT). Select the features required, and click/tap Install. If the User Acccount Control dialog box is displayed, click/tap Yes to allow the app to make changes to your PC.

    Click image for larger version. 

Name:	ADK_SelectFeatures_a.png 
Views:	443 
Size:	44.6 KB 
ID:	27776


    10. The ADK setup program will end with a Welcome message. If you like, check the box to learn more about the Windows Assessment and Deployment Kit, but it it not required for this tutorial. Click/tap Close to exit the setup program.

    Click image for larger version. 

Name:	ADK_EndInstall_a.png 
Views:	237 
Size:	28.6 KB 
ID:	27777





    Provisioning Package - Create in Windows 10 Part Three Provisioning Package - Create in Windows 10
     Prepare the scanstate tool and capture customisations


    11. At the time of writing, the version of the scanstate tool in the ADK needs a workaround to allow it to run the command in this tutorial. The workaround is to copy files from two folders into one, so that all the files required by the scanstate tool are present in the same folder.

    If you like to type in the commands yourself, goto step 16 below. If you want to download a file to run the commands, continue at step 12.

    Note   Note
    If you type in the commands yourself, there is the option of uninstalling the Windows ADK before saving the state of installed software. By uninstalling it means the Windows ADK would not be included in the Provisioning Package that is saved. Otherwise the Windows ADK would be restored by the Reset process or if you reinstalled Windows from a Recovery Drive.

    To run the commands using a batch file

    12. Either:

    If you are running a 32-bit system, download this batch file to your computer.

    download

    OR

    If you are running a 64-bit system, download this batch file to your computer.

    download

    13. Once the batch file has downloaded, right-click it and run as Administrator. You may get a message saying 'Windows Smartscreen protected your PC'. Click on 'More Info' and then 'Run Anyway', then answer Yes to the User Acccount Control dialog box.

    Click image for larger version. 

Name:	Smartscreen1_a.png 
Views:	279 
Size:	47.1 KB 
ID:	27782

    Click image for larger version. 

Name:	Smartscreen2_a.png 
Views:	1090 
Size:	50.6 KB 
ID:	27783


    14. This will create a folder called c:\usmt\scanstate which holds the merged scanstate files, and also writes the provisioning package containing your software to the folder C:\Recovery\Customizations. A log of the scanstate process is kept in the folder c:\usmt .

    15. This completes the process of creating a provisioning package. Go to step 20 for some final steps.

    To run the commands from the command prompt

    16. Open an elevated command prompt.
    Tip   Tip
    There is a new feature in Windows 10: commands can be copied and pasted into command prompts using the normal Ctrl-C and Ctrl-V keyboard shortcuts.

    However you may need to be careful not to copy the 'bullets' from the lists of commands below.

    Either:
    If you are running on 32-bit Windows 10, execute these commands at the command prompt by typing each command and pressing enter:

    • c:
    • md c:\usmt\scanstate
    • cd c:\usmt\scanstate
    • xcopy "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\windows setup\x86\sources"
    • xcopy /s /y "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\x86"


    Or:
    If you are running on 64-bit Windows 10, execute these commands at the command prompt by typing each command and pressing enter:

    • c:
    • md c:\usmt\scanstate
    • cd c:\usmt\scanstate
    • xcopy "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\windows setup\amd64\sources"
    • xcopy /s /y "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\amd64"



    Click image for larger version. 

Name:	CopyScanstate_1_a.png 
Views:	300 
Size:	16.2 KB 
ID:	27784

    Click image for larger version. 

Name:	CopyScanstate_2_a.png 
Views:	264 
Size:	113.5 KB 
ID:	27785


    17. Optional Step:

    At this point, you may want to uninstall the Windows Assessment and Deployment Kit.. You would do this if you didn't want to use the Windows ADK again for another purpose, and wanted to remove it from the Provisioning Package of applications that would be restored when you ran a Reset or Recovery Drive in future.

    If you do this, leave the command prompt open as there is another command to run there.

    To uninstall the Windows ADK, follow Option One or Option Three in this tutorial, and uninstall "Windows Assessment and Deployment Kit"
    Apps - Uninstall in Windows 10

    18. Return to the elevated command prompt (which should be in the c:\usmt\scanstate folder), for example by using the Alt-Tab keyboard combinations to switch applications until you get there.

    From the command prompt, execute this command to save your software. This could take a while, depending on how much software is installed.

    • scanstate /apps /ppkg c:\recovery\customizations\usmt.ppkg /o /v:13 /l:c:\usmt\scanstate.log



    Click image for larger version. 

Name:	scanstate_command_andExit_a.png 
Views:	393 
Size:	63.4 KB 
ID:	27787


    19. Type exit and press Enter, to close the command prompt window.

    20. If you like, you can optionally delete the extra folder created to merge the scanstate files together. Navigate to the c:\usmt folder using File Explorer and delete it.

    Click image for larger version. 

Name:	DeleteUSMT_FileExplorer_a.png 
Views:	216 
Size:	48.4 KB 
ID:	27788


    21.
    Tip   Tip
    Now that the customisations have been saved, you may wish to create a recovery drive. The recovery drive process should automatically includes these customisations if you use the option to 'Back up system files to the recovery drive' when yohu create it.



    That's it!
    David



  1. Joined : Oct 2013
    Posts : 16,502
    64-bit Windows 10 Pro build 14971
       2015-08-07 #1

    Great job David.
      My System SpecsSystem Spec


  2. Joined : Aug 2015
    Toscana (Italy)
    Posts : 4
    Windows 8.1 / 10
       2015-08-09 #2

    tanks, very good
      My System SpecsSystem Spec


  3. Joined : Jul 2015
    Posts : 9
    Windows 10
       2015-08-14 #3

    Process worked great, but I ran into the dreaded "We can't create the recovery drive: A problem occurred while recreating the recovery drive" error.

    Formatting was successful, but the last second before the error I saw "copying utilities". The only thing in the error log was:

    Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object.


    Details:
    AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol.


    System Error:
    Access is denied.
    .
    Previous to this procedure I had been able to create a recovery drive with the checkbox checked. If I can't resolve, I'll just revert to the prior day's system image and undo what we did here.
      My System SpecsSystem Spec


  4. Joined : Jan 2014
    Posts : 928
    Windows 8.1, 10
       2015-08-14 #4

    Hmm I don't know - I've had problems with the recovery drive but they seem independent of this process.

    Can you confirm that in the C:\Recovery\Customizations folder, you *only* have the one file?:
    • usmt.ppkg


    I think extra files in that folder can certainly cause problems.
      My System SpecsSystem Spec


  5. Joined : Jul 2015
    Posts : 9
    Windows 10
       2015-08-14 #5

    Yes, only one file is listed:

    • usmt.ppkg
      My System SpecsSystem Spec


  6. Joined : Jun 2015
    Posts : 1,584
    Windows 3.1 to Windows 10
       2015-08-14 #6

    13. Once the batch file has downloaded, right-click it and run as Administrator. You may get a message saying 'Windows Smartscreen protected your PC'. Click on 'More Info' and then 'Run Anyway', then answer Yes to the User Acccount Control dialog box.
    to prevent the message right click on file and select Unblock
      My System SpecsSystem Spec


  7. Joined : Jul 2015
    Posts : 9
    Windows 10
       2015-08-14 #7

    Kyhi said: View Post
    to prevent the message right click on file and select Unblock
    Thanks, but the process David listed worked great; it's just I can no longer create the recovery disk with the checkbox (system files) checked, which defeats the whole purpose of this thread.
      My System SpecsSystem Spec


  8. Joined : Jan 2014
    Posts : 928
    Windows 8.1, 10
       2015-08-14 #8

    JJDiebolt said: View Post
    Yes, only one file is listed:

    • usmt.ppkg
    I sometimes found that after a reboot (but changing nothing) the Recovery Drive worked at the second attempt - so that may be worth a try.

    Then I would see what happens if you move that file to another folder (eg. C:\Temp)? Will the Create Recovery Drive process work then?

    Also, how big is that usmt.ppkg file?
      My System SpecsSystem Spec


  9. Joined : Jul 2015
    Posts : 9
    Windows 10
       2015-08-14 #9

    It seems to be working now. The only difference was to go to control panel>File Explorer Options and uncheck "hide protected operating system files". I already had "Show Hidden Files, Folders or Drives" selected. This time there was no Event Log "Access is Denied" message or error report. So far its running about 1/3 of the way.."backing up system files". I'll post if it completes.
      My System SpecsSystem Spec


 
Page 1 of 3 123 LastLast


Similar Threads
Tutorial Category
Windows 10 setup skips "what to keep" then doesnt progress
I was in the setup and I think i was on the licence agreement page. When I klicked accept, "what to keep" popped up on the top for an instant then was replaced with "making sure you're ready to install" which sat there saying "please wait" for about...
Installation and Setup
SFC /scannow does not work - what to do??
Greetings. After some troubble with my PC I wanted to restart in safe mode, but it can't do that. Breaks off and write something about a "hard crash", only the taskbar works, and I can also ust winkey+R and start regedit aso. Because of this I...
General Support
No Progress indicator on latest build downloading status
Hi there I'm surprised that on downloading the build there's no indication of its current progress or even WHERE it gets downloaded to. I'd like a bit more control over this -- especially on the % download. Cheers jimbo
Installation and Setup
Microsoft to highlight its 'One Windows' progress at Build 2014
Read more at: Microsoft to highlight its 'One Windows' progress at Build 2014 | ZDNet
Windows 10 News
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 05:34.
Find Us
Twitter Facebook Google+



Windows 10 Forums