For a sample script that can be used with Configuration Manager 2007 to automate the configuration of the Windows Embedded write filter before and after the installation of software and software updates, see Example Script for Configuring Write Filters Using Configuration Manager 2007 on Windows Embedded Devices.

To use the script and perform software distribution and software updates management using Configuration Manager 2007 on Windows Embedded devices that use the Enhanced Write Filter (EWF) or File-Based Write Filter (FBWF) write filter, you must take the following steps:

  1. Create a software distribution package for deployment of the VBScript that contains the following programs:

    • Program 1: Issues the command to disable the write filter.

    • Program 2: Issues the command to enable the write filter.

  2. Create a custom task sequence that performs the following tasks:

    • Set the default scripting host to CScript by running the following command: cmd.exe /c cscript.exe

    • Run Program 1 to disable the write filter.

    • Perform the required software distribution and software update activities.

    • Run Program 2 to enable the write filter.

  3. Deploy the task sequence to devices in your organization.

Note
The sample script has been written to run safely on any operating system, but it has been tested only on Windows XP Embedded images. Test the script thoroughly before running the script on other systems.

Use the following procedures to create a software distribution package and programs containing the sample script and to create and deploy the task sequence to install the script on Windows Embedded devices in your organization.

To create a software distribution package and programs containing the script to be deployed

  1. Copy the script in Example Script for Configuring Write Filters Using Configuration Manager 2007 on Windows Embedded Devices. Save it as a text file named XPeWriteFilters.vbs.

  2. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Software Distribution.

  3. Right-click the Packages node, click New, and then click Package to open the New Package Wizard.

  4. On the General page, specify a name for the package and other optional properties, and then click Next.

  5. On the Data Source page, select This package contains source files.

  6. Under Source version, click Set to open the Set Source Directory dialog box.

  7. In the Set Source Directory dialog box, type or browse to the location where the script file XPeWriteFilters.vbs is located, and then click OK.

  8. On the Data Source page, select Always obtain files from the source directory. Set any remaining options on this page as required, and then click Next.

  9. Complete the remaining pages of the New Package Wizard according to your standard software distribution procedures.

    Note
    This procedure needs to be performed only one time for your Configuration Manager 2007 site.

To create a program to run the VBScript in disable mode

  1. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Software Distribution.

  2. Expand the Packages node, and then expand the name of the package created in the preceding procedure.

  3. Right-click Programs under the package, click New, and then click Program to open the New Program Wizard.

  4. On the General page, specify the following values:

    • In the Name field, enter Disable write filter.

    • In the Command line box, enter cmd.exe /c cscript.exe XPeWriteFilter.vbs DISABLE.

    • In the After running drop-down list, select ConfigMgr restarts computer.

  5. Click Next.

  6. On the Requirements page, click Next.

  7. On the Environment page, select Whether or not a user is logged on from the Program can run drop-down list, and then click Next.

  8. On the Advanced page, select Allow this program to be installed from the Install Software task sequence without being advertised.

  9. Complete the remaining pages of the New Package Wizard according to your standard software distribution procedures.

    Note
    This procedure needs to be performed only one time for your Configuration Manager 2007 site.

To create a program to run the VBScript in enable mode

  1. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Software Distribution.

  2. Expand the Packages node, and then expand the name of the package created in the preceding procedure.

  3. Right-click Programs under the package, click New, and then click Program to open the New Program Wizard.

  4. On the General page, specify the following values:

    • In the Name box, enter Enable write filter.

    • In the Command line box, enter cmd.exe /c cscript.exe XPeWriteFilter.vbs ENABLE.

    • In the After running drop-down list, select ConfigMgr restarts computer.

  5. Click Next.

  6. On the Requirements page, click Next.

  7. On the Environment page, select Whether or not a user is logged on from the Program can run drop-down list, and then click Next.

  8. On the Advanced page, select Allow this program to be installed from the Install Software task sequence without being advertised.

  9. Complete the remaining pages of the New Package Wizard according to your standard software distribution procedures.

    Note
    This procedure needs to be performed only one time for your Configuration Manager 2007 site.

To create the task sequence

  1. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Operating System Deployment, then and expand the node.

  2. Right-click Task Sequences, click New, and then click Task Sequence to open the New Task Sequence Wizard.

  3. On the Create a New Task Sequence page, select Create a new custom task sequence, and then click Next.

  4. On the Task Sequence Information page, specify a name and optional comment for the task sequence, and then click Next. Do not enter a value in the Boot image box.

  5. On the Summary page, review the values you have specified for the task sequence, and then click Next.

  6. Click Close to close the New Task Sequence Wizard.

To edit the task sequence

  1. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Operating System Deployment, then and expand the node.

  2. Click Task Sequences, right-click the task sequence you created in the preceding procedure, and then click Edit to open the Task Sequence Editor.

  3. Click Add, click General,, and then click Run Command Line to add a new task to set the default scripting host.

  4. In the Run Command Line task in the Properties tab, specify the following command in the Command line box:

      Copy Code
    cmd.exe /c cscript.exe
    
  5. Click Add, click General, and then click Install Software to add a new task to disable the write filter.

  6. In the Install Software task in the Properties tab, click Browse, and then select the package you previously created that contains the XPeWriteFilter.vbs script.

  7. From the Program drop-down list, select the program Disable write filter.

  8. Add additional tasks to install software or software updates, as required.

  9. Click Add, click General, and then click Install Software to add a new task to enable the write filter.

  10. In the Install Software task in the Properties tab, click Browse, and then select the package you previously created containing the XPeWriteFilter.vbs script.

  11. From the Program drop-down list, select the program Enable write filter.

  12. Click OK to save the changes and close the Task Sequence Editor.

To deploy the task sequence

  1. In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Operating System Deployment, then and expand the node.

  2. Click Task Sequences, right-click the task sequence you created in the preceding procedure, and then click Advertise to open the New Advertisement Wizard.

  3. On the General page, specify the following information:

    • Name: Specify a name for the advertisement.

    • Comment: Specify an optional description for the advertisement.

    • Task sequence: Click Browse, and then select the task sequence to advertise to Windows Embedded devices.

    • Collection: Click Browse, and then select the collection of Windows Embedded devices to advertise the task sequence to.

  4. Click Next.

  5. Complete the remaining pages of the New Advertisement Wizard according to your standard software distribution procedures.

    The task sequence will now run on the targeted devices, run the script to disable the write filter, and install the required software or updates. Then the script will automatically re-run to enable the write filter after the installation is completed.

See Also