Share via


Adding a RunOnce Request to a Run-Time Image

You can add the RunOnce Request resource either directly to a configuration, or to a custom component that is then added to the configuration.

If you will be adding this RunOnce Request to more than one configuration, you can create a custom component that contains only this resource and then add that component to any configuration that requires it, without having to re-create the resource in every configuration.

If you are already creating a custom component for the application that will be executed by the RunOnce Request, then add the RunOnce Request resource to that custom component. This keeps the two together for easier management.

If you will not be adding this RunOnce Request to a subsequent configuration, or if you are not otherwise creating a custom component for the application that is being executed by the RunOnce Request, then add the resource directly to the configuration.

To add a RunOnce Request resource to a run-time image

  1. To add the RunOnce Request to a component, in the SLD browser in Component Designer, expand the node for the appropriate component, right-click Resources, choose Add, and select RunOnce Request. The Add Component Resources dialog box appears.

    - or -

    To add the RunOnce Request to a configuration, in the configuration editor in Target Designer, right-click Extra Resources, choose Add, and select RunOnce Request. The Add an Extra Resource to the Configuration dialog box appears.

  2. Type a name and description for the RunOnce Request.

  3. Specify the registry data for this RunOnce Request by setting the Extended Properties.

    • To specify the name of the application to be executed by this RunOnce Request and its full path on the target device, double-click FilePath. In the Extended Property dialog box, type the fully qualified path in the Value text box, and choose OK. Use an environment variable in the path name. For example, %11%\MyRunOnceApp.exe. For more information, see Predefined System Environment Variables.

    • To specify any arguments for this application, double-click Arguments. In the Extended Property dialog box, type the arguments in the Value text box, and choose OK.

    • To specify what type of RunOnce Request this is, double-click Flags. In the Extended Property dialog box, type 0, 1, or 2 in the Value text box, and choose OK. The default is 1.

      Flag 0 creates a Run key, flag 1 creates a RunOnce key, and flag 2 creates a RunOnceEx key. For more information about the different RunOnce keys, seeRunOnce Request Types and Scenarios.

    • To specify the name of the registry value that will be used to hold the registry data for this RunOnce Request, double-click ValueName. In the Extended Property dialog box, type the name in the Value text box, and choose OK.

  4. To indicate whether you want this RunOnce Request to appear in Release builds, Debug builds, or both, clear or select the check boxes under Applicable build types.

  5. Select a Build order number between 0 and 32767 for this RunOnce Request. The lower the build order number, the earlier the resource is processed during the run-time image build process and during FBA. The default is 1000.

  6. If this RunOnce Request requires localization, select the This resource requires localization checkbox.

  7. To add this RunOnce Request and keep the dialog box open to create another one, choose Add. To add this RunOnce Request and close the dialog box, choose OK.

See Also

Running an Application Automatically | How to Create a RunOnce/Dedicated Application Run-Time Image

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.