Previous Topic: CreateMIFFile - Create an MIF FileNext Topic: CreateMIFInteger - Create an Integer Attribute


CreateMIFGroup - Create a Group

Valid on UNIX and Windows

CreateMIFGroup creates a group in an existing MIF file.

Function format:

CreateMIFGroup(Filename as string, Name as string, Description as string, Class as string) as integer
Filename

Specifies the file name of the MIF file in which to create the group.

Name

Specifies the Name of the group to create.

Description

Specifies the Description of the group.

Class

Specifies the Class of the group.

On successful completion, the function returns the ID assigned to the group in the MIF file; otherwise, returns zero.

Example:

Dim Dir as String
Dim DriveFree as Integer

'Get directory
Dir = GetDirectory(3)
DriveFree = GetDiskFreeMB(3)

'Create .MIF file
CreateMIFFile(ComputerPath+"Disk.MIF","My Disk Inventory ","","")
CreateMIFGroup(ComputerPath+"Disk.MIF","Disk Info","Disk information","AMClass")
CreateMIFString(ComputerPath+"Disk.MIF","Disk Info","Current Dir",Dir,"Dir name")
CreateMIFInteger(ComputerPath+"Disk.MIF","Disk Info","Free in MB",DriveFree,"Free MB")