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 - Type - Required or optional - String - Optional - 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 - Type - Required or optional - GUID - Not applicable - Reserved for Microsoft. 
- ErrorControl - Type - Required or optional - Integer - Required - 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 - Type - Required or optional - String - Required - 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 - Type - Required or optional - Integer - Required - 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 - Type - Required or optional - Boolean - Required - 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 - Type - Required or optional - Integer - Not applicable - Reserved for Microsoft. Must be 1. 
- TIMEOUT - Type - Required or optional - Integer - Required - 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 - Type - Required or optional - Integer - Required - Reserved for Microsoft. Must be 1. 
- Phase - Type - Required or optional - Integer - Required - 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
Last updated on Wednesday, October 18, 2006
© 2006 Microsoft Corporation. All rights reserved.