
As you will see in the following examples, it’s recommended that you log each action that your script performs. When run on the device, the logfile will be available after provisioning is completed. Here is an example script that logs ‘Hello World’ to a logfile. Granular logging is not built in, so the logging must be built into the script itself. The scripts will be run on the device in system context. If necessary, you can create a script that logs the output per app, as mentioned below (rather than one orchestrator script for the entire provisioning package).Īll actions performed by the script must happen silently, showing no UI and requiring no user interaction. You don’t need to create an orchestrator script. In practice, the orchestrator script may reference many more assets than those in these examples. The following examples are provided to help get started authoring the orchestrator script that will execute the required installers. Makecab -f Ĭreate the script to install the applicationĬreate a script to perform whatever work is needed to install the application(s). Replace with actual files you want to package ** DiskDirectory1 = output directory where cab will be created ** All files are compressed in cabinet files Set FolderSizeThreshold=200000 Aim for ~200K per folder Set MaxDiskFileCount=1000 Limit file count per cabinet, so that set DiskDirectoryTemplate=CDROM All cabinets go in a single directory OPTION EXPLICIT Generate errors on variable typos

*** MSDN Sample Source Code MakeCAB Directive file example DDF file as below, replacing file1 and file2 with the files you want to package, and adding the name of file/directory. If you need to include a directory structure of files, you will need to cab the assets for easy inclusion in the provisioning packages.Ĭreate a. The most common use for this would be to include a subdirectory for each application. 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. It’s common for many apps to have an installer called ‘install.exe’ or similar, and there may be name overlap because of that. Each asset must have a unique filename, because all files will be copied to the same temp directory on the device.

On the device where you’re authoring the package, place all of your assets in a known location. However, some care is needed to avoid unintended behavior during script execution (see Remarks below).

Scripted operations other than installing apps can also be performed. This walkthrough describes how to include scripts in a Windows client provisioning package to install Win32 applications.
