Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

AddProgramItem( )

Action: Instructs Program Manager to add an icon to the active program group.
Syntax: ADDPROGRAMITEM ("command line", "name", "icon path", icon index, "default directory", minimize, replace, run in own space)

Command line

Specifies the command line required to run the application. This parameter is a string containing the name of the executable file for the application. It can also include the path of the application and any required parameters.


Specifies the title that is displayed below the icon in the group window.

Icon path

Identifies the file name for the icon to display in the group window. This string identifies a Windows-based executable file or an icon file. If no icon path is specified, Program Manager uses the first icon in the file specified by command line if that file is an executable file.

If command line specifies a file that has been associated with a program, Program Manager uses the first icon provided in the executable file of that program. Association information is obtained from the registry. If command line specifies neither an executable file nor an associated program, Program Manager uses a default icon.

Icon index

This parameter is an integer that specifies the index of the icon in the file identified by the icon path parameter. Program Manager includes five default icons that can be used for programs not written for Windows.

Default directory

Specifies the name of the default (or working) directory. This parameter is a string.


Optional numeric parameter. Specifies whether an application window is minimized when first displayed. Possible values for this parameter are:

0 Default system setting
1 Minimize

Replace (optional)

Optional numeric parameter. Specifies whether ADDPROGRAMITEM replaces an existing program item with the same name. Possible values for this parameter are:

0 Adds a new program item without replacing the existing one. This is the default.
1 Replaces any existing program item.

Run in own space (optional)

Optional numeric parameter. Specifies whether the program runs in its own address space. This parameter applies only to 16-bit Windows applications running on Windows NT. This parameter can have the following values:

0 Does not run in separate address space. This is the default.
1 Runs in separate address space.
Remarks: There is a limit of 50 items that can be added to each program group.
0 Program item added
Error code Function failed  
See Also: AddProgramGroup( ), DelProgramGroup( ), DelProgramItem( )

If AddProgramItem("c:\windows\regedit.exe", "RegEdit", "", 0, "c:\",0,0) = 0
  ? "Added program item 'RegEdit' to current group..."