Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetupAddToSourceList
Collapse the table of content
Expand the table of content

SetupAddToSourceList function

[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]

The SetupAddToSourceList function appends a value to the list of installation sources for either the current user or the system. If the value already exists, it is removed first, so that duplicate entries are not created.

A caller of this function is required have administrative privileges, otherwise the function fails.

Syntax


BOOL SetupAddToSourceList(
  _In_  DWORD Flags,
  _In_  PCTSTR Source
);

Parameters

Flags [in]

List to which the source will be appended. This parameter can be any combination of the following values.

SRCLIST_SYSTEM

Add the source to the per-system list. The caller must be an administrator.

SRCLIST_USER

Add the source to the per-user list.

SRCLIST_SYSIFADMIN

If the caller is an administrator, the source is added to the per-system list; if the caller is not a member of the administrators local group, the source is added to the per-user list for the current user.

Note  If a temporary list is currently in use (see SetupSetSourceList), the preceding flags are ignored and the source is added to the temporary list.

SRCLIST_APPEND

Add the source to the end of the list. If this flag is not specified, the source is added to the beginning of the list.

Source [in]

Pointer to the source to be added to the list. You should use a null-terminated string.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Setupapi.h

Library

Setupapi.lib

DLL

Setupapi.dll

Unicode and ANSI names

SetupAddToSourceListW (Unicode) and SetupAddToSourceListA (ANSI)

See also

Overview
Functions
SetupRemoveFromSourceList
SetupSetSourceList

 

 

Community Additions

ADD
Show:
© 2015 Microsoft