Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2


The [OEMRun] section enables you to run external applications and command-line scripts run when auditing the computer in Factory mode, by using the Sysprep -factory command.

You can run any application or command shell script accessible on the destination computer or on the network (if you specify a network adapter).

Applications and command shell scripts called in the [OEMRun] section process asynchronously. Each application or script runs in the order specified in the [OEMRun**]** section, but does not have to wait for a previous application to finish before it runs.

You should verify that all applications and shell command scripts listed in this section run in a fully-automated way. If the application or script stops for user input, or for any other reason requiring user interaction, the process eventually times out and logs an error.

The applications and scripts listed in [OEMRunOnce] process before the applications and scripts listed in the [OemRun] section. The [OEMRun] section processes last.

exedescription, exefilepath
Value Description


A short description of the executable file. If the description includes spaces, enclose the string in double quotation marks. (Required.)


A fully qualified path to the executable file or command shell script to run. It supports Universal Naming Convention (UNC) paths if you specify a network card. The path can contain environment variables, such as systemroot or systemdrive, which expand before running the specified executable file for command shell script. (Required.)

"Run Near the End", "c:\windows\near.exe"
"Run Next to Last", "\\server\dir\next.exe"
"Run Last", "c:\%systemroot%\last.bat"