Microsoft Identity Integration Server 2003 Developer Reference

Creating an Executable File to Run a Management Agent

You can create a C# file, compile the C# file into an executable file, and then use this file to run a management agent run profile. Though this is more complicated than creating a Visual Basic .NET script to run a management agent run profile, the advantage is that the compiled file can run as a standalone file that does not require a script engine.

You can create a C# file using Identity Manager. This file can then be compiled into an executable file by using the command-line compiler that is supplied with the .NET Framework. To use the compiler, you must add the compiler location to the path variable of your computer.

To add the compiler path to your system

  1. Find location of the .NET Framework compiler, csc.exe. Note the location of this file.
  2. On the Start menu, right-click My Computers, and then click Properties.
  3. On the Advanced tab of System Properties, click Environment Variables.
  4. In the System Properties list box of the Environment Variables dialog box, click Path, and then click Edit.
  5. Go to the end of the text in the Variable value text box of the Edit System Variable dialog box and type a semi-colon (;) followed by the location of the .NET Framework compiler. Click OK to close the dialog boxes.
After adding the compiler path to your computer, you can use Identity Manager to create a source file for a run profile.

To create the source file for a run profile

  1. In Identity Manager, on the Tools menu, click Management Agents.
  2. In Management Agents, click a management agent.
  3. On the Actions menu, click Configure Run Profiles.
  4. In the Configure Run Profiles for ManagementAgent dialog box, in Management agent run profiles, click the run profile that you want to compile into an executable file, and then click Script.
  5. In the Save as dialog box, type a name and location for the script.
  6. On the Save as type drop-down list box, click C# Files.

Note   The compiler can create an executable file from a C# file only. The compiler cannot create an executable file from a Visual Basic script (.vbs) file.

After creating the C# source file for a run profile, you can use the compiler to compile the source file into an executable file that you can run as a standalone file.

To create an executable file from the source file

  1. Open a command prompt and browse to the location of your source file.
  2. At the command prompt, type csc <source file name>, and then press Enter.
The compiler creates an executable file of the same name as your source file. For more information about the compiler, go to the Microsoft Developer Network at and in the left pane, search for the topic Building From the Command Line.

See Also

Creating Scripts to Run Management Agents