windows-itpro-docs/windows/deploy/provisioning-script-to-install-app.md
jdeckerMS 5b91586ba7 Squashed commit of the following:
commit 9f95be92f864acf6a9cef8121e9d7c5b02f18da6
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 13:28:40 2017 -0800

    fix table

commit eaaf7927d163b4fb3eb89f2e9e3b2de367be8ea0
Merge: c53bbe2 cf11083
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 13:19:19 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit c53bbe240c88573cacdbfd424b2549ff895b2263
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 09:06:46 2017 -0800

    sync

commit 2db82b374821d5e57224f3492c4fdcf68a8d7c36
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:57:23 2017 -0800

    sync

commit a3fd8ad3d9d909e98332252e702e31496bb53cf0
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:49:41 2017 -0800

    sync

commit de0b46958e5783d0edb31c916f45f45118f9cd2f
Merge: c80779f deb778a
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:49:00 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit c80779f75b34ccd0c6772b695332f667d90aa760
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:48:10 2017 -0800

    fix code block

commit 24a001bff7cf3c0451195a094f063a80f61450e0
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:44:48 2017 -0800

    fix link

commit 574411a38d113a974a5c406746a06f629cdb50c0
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:38:57 2017 -0800

    fix links, format

commit 5e106b72f679243b0c601146277b66f9045c26f9
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:25:17 2017 -0800

    fix format

commit 6c693cee1a305955fcb3b711f393ed695e51e96f
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 08:11:09 2017 -0800

    tweak apply

commit 501e1100d08b21a107a6d55f335edad08620250d
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 07:44:01 2017 -0800

    moved apply procs, learn more links

commit 17c18a8970ccff5f11239031188a9f7a4f59f8f7
Merge: 3c80075 37bf478
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 18 07:38:50 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 3c80075ab12e4ced0134c3ad02f7de7e0ec0c24d
Merge: 4b77100 a4496a2
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 15:37:33 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 4b771007b71692959676a4290492af0ea7375c2d
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 15:35:26 2017 -0800

    missing intro

commit 7c5406e213c5a84497352fb76ef491d53a1ecf74
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 15:30:05 2017 -0800

    add related links

commit deacc390e081365fc4be0509fc4a4b016fbe3734
Merge: d62ca20 a3fba4c
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 14:29:29 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit d62ca20830be9ce1afae4deba12c6688c591554c
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 14:27:56 2017 -0800

    escaped < >

commit dd2e558fd6e9cb38ecba49cb0d2d4ea08d5a53ae
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 14:14:01 2017 -0800

    multivariant

commit 668cdc313f47565f1275261496db748975d2b5b1
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 13:23:41 2017 -0800

    update change deploy

commit 1b5070b0f8bdbbe2e8d53c84173d0f0818bc1b30
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 13:21:51 2017 -0800

    resolve conflict change history manage

commit 8e342df4125216b4fa802204cb26441b1ecf63df
Merge: 031f50b 9793669
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 13:20:28 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 031f50b5ee684a048c34e6cf297149343585ec69
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 13:17:33 2017 -0800

    tweak

commit 54e2eb787d78c3a680e4c54e63b99e06a293fc39
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 11:15:51 2017 -0800

    tweak table

commit 4dc33fb1898f168b1bf59a127f7317e1df5ab4ef
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 11:02:33 2017 -0800

    cli

commit 755758d424f92bb0e8f42281310d9855aaaba4d6
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 10:56:38 2017 -0800

    new topics

commit 0711e5571a34788a5402c3e35a522341f1bf68b5
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 10:08:03 2017 -0800

    update how it works

commit 210680ebf086e973ab06b9d7cf35768efa3fd6c4
Merge: eeec810 a171f82
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 09:17:08 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit eeec8100536b249aec154852d0879a81e9d07dda
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 17 09:16:38 2017 -0800

    reorder how it works

commit ed862463fc83d9f46ed8081cc3166d3bf123aa21
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 14:26:43 2017 -0800

    sync

commit 8abd729805cb0719104a118529f037effa197457
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 13:44:26 2017 -0800

    moved sections between topics

commit fad95aa31de0a9e621338751671c499779fb362e
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 13:21:36 2017 -0800

    sync

commit efb848b257da63dd7b84e2e8edb12139f54e3dc1
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 12:53:53 2017 -0800

    reorg apply

commit 1a98b619c49c4cda9ab673247ba80771c9519251
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 12:42:00 2017 -0800

    finish create

commit 0ec9ade931ab3b74fddf0bbc25cd1d986ad382ed
Merge: f169e92 44e62eb
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 12:41:30 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit f169e92adea1d42a21c0844a6f109d5e632cdc08
Merge: 0f182c8 110241e
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 12:06:04 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 0f182c8e9af068d65b29851b8569c5518707d773
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 11:25:52 2017 -0800

    switch

commit 351ab3a2b1d81481a4b760c65fbd33d36e7c9089
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 09:55:25 2017 -0800

    updates to install

commit 5b01085b0b961512fa891a171330967c9f4f7657
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 09:36:06 2017 -0800

    sync

commit 837f0a902fa66cc07f83b93b3f66cbc160d09fc6
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Fri Jan 13 08:58:22 2017 -0800

    sync

commit 2d8a29cb97b3f16dd0bb2d664ad9cdd11123b5ae
Merge: ad8151c c564f3e
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 12:51:13 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit ad8151c775a18bcec03d41631c6c43d1b2fabb28
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 12:50:30 2017 -0800

    sync

commit 514161581723808a2ed5c29b24a3dcfd28901b78
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 12:03:30 2017 -0800

    remove graphic

commit 8d4ab1471d1f8d2c5d3a28cab73e860dd0e25e7c
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 11:58:23 2017 -0800

    sync

commit 3147720b7edc492b93aa8def7ca94bec4f54b74b
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 11:45:07 2017 -0800

    fix format

commit 67fa6473648c45b4b9ff31d506bd9485b67a9760
Merge: 9995503 24803cd
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 11:43:21 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 9995503434d09fcbae73510ee0aec6123bc1a6f8
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 10:36:33 2017 -0800

    add links

commit 3e725b83f60c2ce06e043f704d4dbb86e7064ec8
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 10:34:16 2017 -0800

    sync

commit d40be4b40ecff550e9ccf0f022609e81142fc923
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 09:02:52 2017 -0800

    add topic

commit 010b2f64320a02857b189493e7e71934f8030c11
Merge: 639e54e 7519b87
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Thu Jan 12 08:26:45 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 639e54e4525c4cc0b79b770e8e81b07574e032cc
Merge: 79a7ee0 97b8484
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 14:33:39 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 79a7ee0597a4198a5be098cafe960c23b5f2f88b
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 14:33:08 2017 -0800

    sync

commit ca313243bfc7cd9ac81c623eeafbe60fc2e6ce1d
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 13:17:04 2017 -0800

    add art

commit 938e50ca5db8304e7e44d040fd9e6c25ef3d402f
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 12:40:47 2017 -0800

    mobile

commit 0552360320664f8f61a73eed5212a8f476d27f2f
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 11:38:56 2017 -0800

    complete desktop

commit b3cea45101b03d0a8ba79b916a3b8c2de0ad09b1
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 11:10:09 2017 -0800

    format check

commit 2271bd9206316c752d0634c3df93ff23c6a80abd
Merge: 6a3478d 8ef9050
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 10:44:20 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 6a3478d8ab1f113150de7dd5df89118c4915b947
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 10:43:42 2017 -0800

    sync changes

commit 12964dabbbea4f1084d0396c956a23784a900f48
Merge: affb590 ec7b776
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Wed Jan 11 08:17:43 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit affb590262719ce7500292070c218d4b4f518c62
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 10 14:22:43 2017 -0800

    related topics

commit 0fb18bddbc1ec4c83f72b6d38159ed1d552d709f
Merge: 58555e2 2cad77f
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 10 14:12:50 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 58555e2dac6e8ca95b9110436b4c601b6727e7d0
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 10 12:00:52 2017 -0800

    sync

commit 4d107c68d6bbc27bc75ec714b844650a5eb1f678
Merge: 5d52165 60611e5
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Tue Jan 10 08:59:51 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 5d521654f1ae9233d7857fbde2ac0afb95f93f1e
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 14:06:10 2017 -0800

    sync

commit f21d6c41af1ef019cfe757b181fb757adee90ac3
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 13:01:41 2017 -0800

    metadata and uninstall content

commit 81f8976b6e3a2306220948800541a413d866041b
Merge: 9654e2b f81dbd0
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 12:26:40 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 9654e2b3886249d4a6235b209c20bca4596fbf18
Merge: 47d6aa6 310c015
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 11:04:24 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit 47d6aa6ec8ebaaffa529066320c84635dd5a991e
Merge: a9bc13c f33df1b
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 09:59:28 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov

commit a9bc13c733bb231306bc75512fae0c5882fd713e
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 09:58:57 2017 -0800

    add topics

commit 8797ae2c0a04bb776811701c2d0672ab457b2bba
Merge: c053cb6 88cf4ee
Author: jdeckerMS <jdecker@microsoft.com>
Date:   Mon Jan 9 09:47:39 2017 -0800

    Merge remote-tracking branch 'refs/remotes/origin/master' into jdprov
2017-01-18 13:34:06 -08:00

12 KiB
Raw Blame History

title, description, ms.prod, ms.mktglfcycl, ms.sitesec, author, localizationpriority
title description ms.prod ms.mktglfcycl ms.sitesec author localizationpriority
Use a script to install a desktop app in provisioning packages (Windows 10) With Windows 10, you can create provisioning packages that let you quickly and efficiently configure a device without having to install a new image. w10 deploy library jdeckerMS high

Use a script to install a desktop app in provisioning packages

Applies to

  • Windows 10
  • Windows 10 Mobile

This walkthrough describes how to leverage the ability to include scripts in a Windows 10 provisioning package to install Win32 applications. Scripted operations other than installing apps can also be performed, however, some care is needed in order to avoid unintended behavior during script execution (see Remarks below).

Prerequisite: Windows Assessment and Deployment Kit (ADK) for Windows 10, version 1511 or higher

Note

This scenario is only supported for installing applications on Windows 10 for desktop, version 1511 or higher.

Assemble the application assets

  1. On the device where youre authoring the package, place all of your assets in a known location. Each asset must have a unique filename, because all files will be copied to the same temp directory on the device. Its common for many apps to have an installer called install.exe or similar, and there may be name overlap because of that. To fix this, you can use the technique described in the next step to include a complete directory structure that is then expanded into the temp directory on the device. The most common use for this would be to include a subdirectory for each application.

  2. If you need to include a directory structure of files, you will need to cab the assets for easy inclusion in the provisioning packages.

Cab the application assets

  1. Create a .DDF file as below, replacing file1 and file2 with the files you want to package, and adding the name of file/directory.

    ;*** MSDN Sample Source Code MakeCAB Directive file example
    
    ;
    
    .OPTION EXPLICIT  ; Generate errors on variable typos
    
    .set DiskDirectoryTemplate=CDROM  ; All cabinets go in a single directory
    
    .Set MaxDiskFileCount=1000; Limit file count per cabinet, so that
    
    ; scanning is not too slow
    
    .Set FolderSizeThreshold=200000   ; Aim for ~200K per folder
    
    .Set CompressionType=MSZIP
    
    ;** All files are compressed in cabinet files
    
    .Set Cabinet=on
    
    .Set Compress=on
    
    ;-------------------------------------------------------------------
    
    ;** CabinetNameTemplate = name of cab
    
    ;** DiskDirectory1 = output directory where cab will be created
    
    ;-------------------------------------------------------------------
    
    .Set CabinetNameTemplate=tt.cab
    
    .Set DiskDirectory1=.
    
    ;-------------------------------------------------------------------
    
    ; Replace <file> with actual files you want to package
    
    ;-------------------------------------------------------------------
    
    <file1>
    
    <file2>
    
    ;*** <the end>  
    
  2. Use makecab to create the cab files.

    Makecab -f <path to DDF file>
    

Create the script to install the application

Create a script to perform whatever work is needed to install the application(s). The following examples are provided to help get started authoring the orchestrator script that will execute the required installers. In practice, the orchestrator script may reference many more assets than those in these examples.

Note

All actions performed by the script must happen silently, showing no UI and requiring no user interaction.

The scripts will be run on the device in system context.

Debugging example

Granular logging is not built in, so the logging must be built into the script itself. Here is an example script that logs Hello World to a logfile. When run on the device, the logfile will be available after provisioning is completed. As you will see in the following examples, its recommended that you log each action that your script performs.

set LOGFILE=%SystemDrive%\HelloWorld.log
echo Hello, World >> %LOGFILE% 

.exe example

This example script shows how to create a log output file on the system drive, install an app from a .exe installer, and echo the results to the log file.

set LOGFILE=%SystemDrive%\Fiddler_install.log
echo Installing Fiddler.exe >> %LOGFILE%
fiddler4setup.exe /S >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%

.msi example

This is the same as the previous installer, but installs the app from an MSI installer. Notice that msiexec is called with the /quiet flag in order to meet the silent requirement of scripts run from within a provisioning package.

set LOGFILE=%SystemDrive%\IPOverUsb_install.log
echo Installing IpOverUsbInstaller.msi >> %LOGFILE%
msiexec /i IpOverUsbInstaller.msi /quiet >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%

PowerShell example

This is an example script with logging that shows how to run a powershell script from the provisioning commands setting. Note that the PowerShell script referenced from this example must also be included in the package, and obey the same requirements as all scripts run from within the provisioning package: it must execute silently, with no user interaction.

set LOGFILE=%SystemDrive%\my_powershell_script.log
echo Running my_powershell_script.ps1 in system context >> %LOGFILE%
echo Executing "PsExec.exe -accepteula -i -s cmd.exe /c powershell.exe my_powershell_script.ps1" >> %LOGFILE%
PsExec.exe -accepteula -i -s cmd.exe /c powershell.exe my_powershell_script.ps1' >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%

Extract from a .CAB example

This example script shows expansion of a .cab from the provisioning commands script, as well as installation of the expanded setup.exe

set LOGFILE=%SystemDrive%\install_my_app.log
echo Expanding installer_assets.cab >> %LOGFILE%
expand -r installer_assets.cab -F:* . >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Installing MyApp >> %LOGFILE%
setup.exe >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%

Calling multiple scripts in the package

You are currently allowed one CommandLine per PPKG. The batch files shown above are orchestrator scripts that manage the installation and calls any other scripts included in the PPKG. The orchestrator script is what should be invoked from the CommandLine specified in the package.

Heres a table describing this relationship, using the PowerShell example from above:

ICD Setting Value Description
ProvisioningCommands/DeviceContext/CommandLine cmd /c PowerShell_Example.bat The command line needed to invoke the orchestrator script.
ProvisioningCommands/DeviceContext/CommandFiles PowerShell_Example.bat The single orchestrator script referenced by the command line that handles calling into the required installers or performing any other actions such as expanding cab files. This script must do the required logging.
ProvisioningCommands/DeviceContext/CommandFiles my_powershell_script.ps1 Other assets referenced by the orchestrator script. In this example there is only one, but there could be many assets referenced here. One common use case is using the orchestrator to call a series of install.exe or setup.exe installers to install several applications. Each of those installers must be included as an asset here.

Add script to provisioning package

When you have the batch file written and the referenced assets ready to include, you can add them to a provisioning package in the Window Imaging and Configuration Designer (Windows ICD).

Using ICD, specify the full details of how the script should be run in the CommandLine setting in the provisioning package. This includes flags or any other parameters that you would normally type on the command line. So for example if the package contained an app installer called install.exe and a script used to automate the install called InstallMyApp.bat, the ProvisioningCommands/DeviceContext/CommandLine setting should be configured to:

cmd /c InstallMyApp.bat

In ICD, this looks like:

Command line in Selected customizations

You also need to add the relevant assets for that command line including the orchestrator script and any other assets it references such as installers or .cab files.

In ICD, that is done by adding files under the ProvisioningCommands/DeviceContext/CommandFiles setting.

Command files in Selected customizations

When you are done, build the package.

Remarks

  1. No user interaction or console output is supported via ProvisioningCommands. All work needs to be silent. If your script attempts to do any of the following it will cause undefined behavior, and could put the device in an unrecoverable state if executed during setup or the Out of Box Experience: a. Echo to console b. Display anything on the screen c. Prompt the user with a dialog or install wizard

  2. When applied at first boot, provisioning runs early in the boot sequence and before a user context has been established; care must be taken to only include installers that can run at this time. Other installers can be provisioned via a management tool.

  3. If the device is put into an unrecoverable state because of a bad script, you can reset it using recovery options in Windows 10.

  4. The CommandFile assets are deployed on the device to a temporary folder unique to each package. a. For packages added during the out of box experience, this is usually in %WINDIR%\system32\config\systemprofile\appdata\local\Temp\ProvisioningPkgTmp\<{PackageIdGuid}>\Commands b. For packages added by double-clicking on an already deployed device, this will be in the temp folder for the user executing the PPKG: %TMP%\ProvisioningPkgTmp\<{PackageIdGuid}>\Commands

  5. The command line will be executed with the directory the CommandFiles were deployed to as the working directory. This means you do not need to specific the full path to assets in the command line or from within any script.

  6. The runtime provisioning component will attempt to run the scripts from the PPKG at the earliest point possible, depending on the stage when the PPKG was added. For example, if the package was added during the Out-of-Box Experience, it will be run immediately after the package is applied, while the Out-of-Box Experience is still happening. This is before the user account configuration options are presented to the user. A spinning progress dialog will appear and “please wait” will be displayed on the screen.

    Note

    There is a timeout of 30 minutes for the provisioning process at this point. All scripts and installs need to complete within this time.

  7. The scripts are executed in the background as the rest of provisioning continues to run. For packages added on existing systems using the double-click to install, there is no notification that provisioning or script execution has completed