Windows XP Embedded SP2 Feature Pack 2007
FBA Generic Command

This resource is required for a component that needs programs executed at first boot of the run-time image. First Boot Agent (FBA) calls the Win32 CreateProcess function to run a program and optionally pass it command-line arguments.

The following extended properties can be set for the FBA Generic Command resource in Component Designer or in Target Designer.

Arguments
TypeRequired or optional
StringOptional

Used to pass command-line arguments to a program run by FBA. Arguments containing paths should use environment variables in path names. For more information, see Predefined System Environment Variables.

The default value is an empty string.

ComponentVSGUID
TypeRequired or optional
GUIDNot applicable

Reserved for Microsoft.

ErrorControl
TypeRequired or optional
IntegerRequired

Controls how FBA handles errors when executing a program.

  • 0: Continue on error. Default.
  • 1: Halt on error.

If the CreateProcess return value or the process exit code is greater than 0x80000000, then FBA considers this an error and behaves according to the value of this property.

Filepath
TypeRequired or optional
StringRequired

Specifies the name of the program to be executed. This value must be a fully qualified path, for example, %11%\cmd.exe. Use environment variables in path names. For more information, see Predefined System Environment Variables.

Flags
TypeRequired or optional
IntegerRequired

Supports the following flags:

  • 0: Create the process and wait timeout seconds for it to exit before continuing. Default.
  • 1: Create the process and continue.
REBOOT
TypeRequired or optional
BooleanRequired

Specifies if a reboot is required following the completion of the FBA operation.

  • True: FBA completes its operation, reboots, and then continues.
  • False: FBA continues to process without rebooting. Default.
START
TypeRequired or optional
IntegerNot applicable

Reserved for Microsoft. Must be 1.

TIMEOUT
TypeRequired or optional
IntegerRequired

Specifies the time, in seconds, that a program is allowed to execute before being terminated by FBA.

The default value of 0 indicates an infinite number of seconds. This value is ignored if Flags is 1.

Type
TypeRequired or optional
IntegerRequired

Reserved for Microsoft. Must be 1.

Phase
TypeRequired or optional
IntegerRequired

Determines the time during FBA processing at which the command runs.

Note   You must specify a phase that is above the 0-8500 system-reserved phase range.

In most cases, the value should be set at 8501. If the processing needs to occur after cloning, the value should be set at 12000.

The following examples show how to use the FBA Generic Command to call a DLL entry point using Rundll32.exe.

The following command shows how to run Rundll32.exe.

Rundll32.exe <dllname>,<entrypoint>,<optional arguments>

The following command shows how to use the command.

Rundll32.exe Setupx.dll,InstallHinfSection 132 C:\Windows\Inf\Shell.inf

Using this example, set the following FBA Generic Command parameters as follows:

  • Filepath: %11%\Rundll32.exe
  • Arguments: Setupx.dll,InstallHinfSection 132 C:\Windows\Inf\Shell.inf

See Also

Custom Resources


© 2006 Microsoft Corporation. All rights reserved.


Page view tracker