Getting Started with the Administration COM Objects
To start using the administration COM objects, set up your development environment using either of the following procedures, depending on whether you use Microsoft® Visual Basic® or C++. You must have, at a minimum, ISA Server Management installed for the procedures to work. Example code for creating administration scripts in Visual Basic Scripting Edition (VBScript), including step-by-step examples, is provided in ISA Server Administration Script Samples.
To start using the administration COM objects with Visual Basic
- Open Microsoft Visual Studio .NET.
- On the Start Page, click New Project.
- Under Project Types, click Visual Basic Projects.
- Under Templates, click Console Application if you want to create a command-line application, or Windows Application if you wnat to create an application with a Windows user interface, and then click OK.
- On the Project menu, click Add Reference.
- On the COM tab, select Microsoft Internet Security and Acceleration Server 2004 Administration Library from the dialog box that appears. This library is defined in Msfpccom.dll, which is a file included with ISA Server. Therefore, you need to have ISA Server installed for access to this library. Adding this library as a reference will make the administration COM objects available to your project.
- Create an instance of the root ISA Server object as described in Creating the Root ISA Server Object.
- Write your program. See Add a Schedule for an introductory example.
- To apply your changes, you must call the Save method on an applicable object.
Note Unless otherwise noted, the examples in this section are written in Visual Basic or Visual Basic Scripting Edition (VBScript), but you can use any language to script with the administration COM objects. If you script with VBScript, you do not need to set up a development environment, and you can use any text editor to create the scripts.
If you are using VBScript and would like to use enumerated types, see Using Enumerated Types in Scripts.
To start using the administration COM objects with C++, include the file Msfpccom.dll by using the following line of code:
#import "%SystemDrive%\Program Files\Microsoft ISA Server 2004\msfpccom.dll"
The file Msfpccom.idl contains the definitions of the ISA Server administration COM objects.
For an example of an administration task performed using C++ code, see Adding a Schedule Using C++.
This section contains the following topics: