Create a Custom Module by Using Module Designer (Standard 8)

7/8/2014

Learn how to use Module Designer (MOD) to create a custom module for Windows Embedded 8 Standard (Standard 8).

Introduction

In Windows Embedded 8 Standard (Standard 8), you can create custom modules to easily and automatically deploy custom software and device drivers to your device. By creating modules in Module Designer (MOD), you can add files and programs to your module and specify how these files are installed on the device. After you create your custom module, you can import the module directly into Image Configuration Editor (ICE) and Image Builder Wizard (IBW) so that you can easily incorporate your software with the other operating system modules that make up your device configuration.

The overall cycle of module creation and consumption is:

Lifecycle of a module from creation to deployment

Lab Exercise Purpose

This lab exercise will familiarize you with how to create a custom module. Custom modules can automatically install custom software for your device, install drivers, or run scripts to customize your device. In this lab exercise, you will create a custom module that contains software to install on your device.

Overview of Steps

  • Step 1: Create a Custom Module
    First, create a new custom module that contains the software or other files you want to deploy on your device. You can use many options in the Module Designer tool to create a module that performs the correct installation tasks for your scenario.
  • Step 2: (Optional) Add Files to Your Module
    After you fill out the basic information about your module, you can add your own files to your module. These files are copied to your device when the OS is installed. Follow this step if you have files that you used in the past that you want to use with the Standard 8 tools.

    Note

    Files and folders copied to a device as the payload of a custom module are marked as hidden in Windows Explorer.

  • Step 3: (Optional) Create Installation Commands for Your Module
    In this step, you add installation commands to your module that describes actions your module will perform when it is installed. Follow this step if you have custom commands that you used in the past that you want to use with the Standard 8 tools.
  • Step 4: (Optional) Add Dependencies to Your Module
    In this step, you add dependencies to your module that describe other operating system or custom modules that your module requires in order to work correctly. Follow this step if you have dependencies that you used in the past that you want to use with the Standard 8 tools.
  • Step 5: (Optional) Add Uninstall Commands to Your Module
    In this step, you add uninstall commands to your module that describe actions your module will perform when it is uninstalled. Follow this step if you have to perform any actions when the module is uninstalled, such as running an uninstall script to remove the module files from the disk, clean up any user files or registry entries, or any other actions.
  • Step 6: Save Your Module
    In this step, you will save and import your module into a catalog so that you can select it in ICE and IBW.

Prerequisites

To perform the steps in this lab exercise, the following things are required:

Required Hardware

Your development computer and your device must meet the following minimum hardware requirements:

Required Software

The following software is required:

  • Module Designer must be installed on your development computer.

Required Lab Exercises or Knowledge

The following lab exercises must be completed before you begin this lab exercise:

Knowledge of the following is recommended before you begin this lab exercise:

Step 1: Create a Custom Module

In this step you create a custom module that contains the software you want to install on your device. You add software to your module and describe how your module will be installed.

To create a custom module

  1. On the Windows Start menu, click All Programs, click Windows Embedded 8 Standard, and then click Module Designer

  2. On the Module Designer page, select Create new module, and then click Next.

  3. On the Module Details page, click the Browse button to the right of the Catalog field. Navigate to the Standard 8 catalog, for example, C:\Windows Embedded Catalog, and then click Select Catalog.

  4. Enter the name for your module in the Friendly name field.

  5. Click the Primary Architecture drop-down to select the architecture of the device that your module will support.

  6. If your device supports the x64 architecture and you want your module to support x64 in addition to x86, select the x64Supported architectures check box.

  7. Click Next to proceed to the Additional Module Information page.

  8. Additional Module Information page lets you enter descriptive information about your module. Enter Test custom module into the Module description field, and then click Next to proceed to the Files page.

Additional Information

The Minimum supported OS version drop-down on the Module Details page lets you specify which operating system versions your module will be supported on.

The Category field on the Module Details page defines where the module will be displayed when you view the list of modules in ICE and IBW 

Step 2: (Optional) Add Files to Your Module

After you add the basic information about your module, you can add your own files that you want to copy to your device when the OS is installed. You can add any type of files to your module that will meet the needs of your device. For example, you might want to include any of the following files:

  • Software installers. For example, InstallYourApplication.msi
  • Application folders. For example, C:\Program Files\YourApp\
  • Device drivers. For example, VideoCardDriver.inf
  • Miscellaneous files. For example, CustomBackground.bmp

If you have no files of your own that you want to add to your module, click Next to proceed to the Install Commands page and proceed to Step 3: (Optional) Create Installation Commands for Your Module

To add files to your module

  1. To add files or drivers to your module, click the Add Payload button, move to the file that you want to add, and then click Open.

  2. Once you add the files you want to install with your module, you can specify the destination path where the files will be copied on the device. To modify the destination path, click the Destination Path for the file that you want to change. If you selected a folder of files, only the top level folder destination may be changed.

  3. Click Next to proceed to the Install Commands page.

Additional Information

To remove files from your module, select them in the Files pane and then click the Remove Payload button.

To add a directory to your module, click the Add Payload button, move to the directory you want to add to your module, double-click the directory, and then click Open.

Step 3: (Optional) Create Installation Commands for Your Module

Installation commands describe actions your module will perform when it is installed. If the software for your device requires any actions to be executed in addition to copying files, you can add these actions here. The following list shows some examples of installation commands:

  • Run an application installer. For example, InstallYourApplication.msi
  • Run an application with parameters. For example, msiexec /i InstallMyApplication.msi /quiet
  • Run a system command. For example, shutdown /r

If you have no installation commands that you want to add to your module, click Next to proceed to the Dependencies page and proceed to Step 4: (Optional) To Add Dependencies to Your Module.

To create installation commands for your module

  1. Click Add Custom Command.

    In the row that appears in the Installation Commands window, enter the command that will execute during the installation of your module.

  2. If you added any files to your module during the previous step, Step 2: (Optional) Add Files to Your Module, you can reference them in your commands by first clicking Add Payload Command, locating and selecting the file that you previously added to the module, and then clicking OK. The path of the file is inserted into the Installation Commands window. Once a payload file is in the commands list, the command can be edited as you want. For example, if you added a MSI payload file, you could add msiexec –I before the payload file and /quiet to the end to have a silent automatic install.

  3. You can change the order in which the commands execute by highlighting a command and clicking the up or down arrow buttons.

  4. Once you add the installation commands that you want to this module, click Next to proceed to the Dependencies page.

Step 4: (Optional) Add Dependencies to Your Module

Dependencies are the way to describe that your module needs another module in order to function correctly. Examples of dependencies are a C# application that requires the .NET module, or a video file that you want to play on your devices that requires Windows Media Player.

The dependencies you create will be automatically included in the operating system configuration when your module is selected in ICE or IBW. By using dependencies, you can easily add your module to configurations without having to remember what your module must have to work correctly.

If you do not have any module dependencies that you want to add, click Next to proceed to the Uninstall Commands page and proceed to Step 5: (Optional) Add Uninstall Commands to Your Module.

To add dependencies to your module

  1. Click the Add button to add or remove a dependent module. The Add/Edit Dependency dialog appears.

  2. To add a module that your module is dependent upon, move to the dependent module in the Available Modules pane, and then click Add. Click OK when you are finished adding dependencies.

  3. To remove a module that your module is no longer dependent upon, move to the dependent module in the Selected Modules pane and then click Remove

  4. When you are ready to save your module, click Next to move to the Uninstall Commands page.

Step 5: (Optional) Add Uninstall Commands to Your Module

Uninstall commands describe actions your module will perform when it is uninstalled. By default, uninstalling your module only removes the module configuration file from the module store. If the software for your device requires any other actions to be executed when uninstalling this module, you can add these actions here. The following list shows some examples of uninstall commands:

  • Run an application uninstall. For example, MyProgram.exe /uninstall or msiexec /u mymsi.msi /quiet
  • Remove files that are no longer needed. For example, del file.exe or rmdir mydirectory
  • Run a system command. For example, shutdown /r.

If you do not want to allow your module to be uninstalled, click This module cannot be uninstalled.

If you have no uninstall commands that you want to add to your module, click Next to proceed to the Save Module page and proceed to Step 6: Save Your Module.

To create uninstall commands for your module

  1. Click Add Custom Command.

    In the row that appears in the Uninstall Commands window, enter the command that will execute during the uninstallation of your module.

  2. If you added any files to your module during the previous step, Step 2: (Optional) Add Files to Your Module, you can reference them in your commands by first clicking Add Payload Command, locating and selecting the file that you previously added to the module, and then clicking OK. The path of the file is inserted into the Uninstall Commands to be executed window. Once a payload file is in the commands list, the command can be edited as you want.

  3. Once you add the uninstall commands that you want to this module, click Next to proceed to the Dependencies page.

Step 6: Save Your Module

Save and import your module into a catalog so that you can select it in ICE and IBW.

To save your module

  1. Ensure that the Save module configuration file check-box is selected. This is useful for quickly saving your module for reuse in Module Designer later. A module file will not actually be created, but all your progress in Module Designer will be saved so that you may continue at a later point. You can change the default file name and location if you want.

  2. Ensure that the Create and save module check box is not selected. Selecting this option will create a module, which can be installed to your device. This option is useful for installing your module on an existing Standard 8 operating system without reinstalling the complete OS. We will not be using this option in this lab exercise.

  3. Ensure that the Create module and import it into the catalog check-box is selected. Selecting this option will make your module available in ICE, and it will be available in IBW after you create a new IBW disk based on your updated catalog.

  4. Click Create to save your module.

  5. Click Finish to exit Module Designer.

Conclusion

You have now created a custom module that contains files you want to have copied on your device and installation commands to correctly install your software. Now that your module is complete, you are ready to use this module in ICE and IBW to automatically install your software alongside the rest of your OS.

  • Use a Custom Module in Image Builder Wizard
    Use ICE to create a custom IBW disk that contains your module and then use that disk to install an OS on your device. This approach is the fastest way to create an OS that contains your module because you can use IBW to automatically identify the drivers that your device needs before you install the OS.
  • Use a Custom Module in Image Configuration Editor
    Use ICE to create a configuration file that contains your module and then use IBW to install an OS image based on that configuration file on your device. This approach offers the most flexibility because you can use ICE to create a configuration file and additionally customize your OS before you install your OS with IBW.

Additional Information

See Also

Other Resources

Create and Use a Custom Module