Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PSRegisterPropertySchema function

Informs the schema subsystem of the addition of a property description schema file.


HRESULT PSRegisterPropertySchema(
  _In_ PCWSTR pszPath


pszPath [in]


Pointer to the full file path, as a Unicode string, to the property description schema (.propdesc) file on the local machine. This can be either a fully-specified full path, or a full path that includes environment variables such as %PROGRAMFILES%.

Return value


Returns one of the following values.

Return codeDescription

All property descriptions in the schema were registered.


The calling context does not have proper privileges.


One or more property descriptions in the schema failed to register. The specific failures are logged in the application event log.



This function is a wrapper API for the schema subsystem's implementation of IPropertySystem::RegisterPropertySchema. Call this function only when the file is first installed on the computer. Typically, a setup application calls this function after it installs the .propdesc file, which should be stored in the install directory of the application under Program Files. Multiple calls can be made to IPropertySystem::RegisterPropertySchema in order to register multiple schema files.

When registering property schema files, remember that they can be read by processes running as different users. Therefore, it is important to place a schema file in a location that grants read access to all users on the machine. Similarly, use the absolute path to the file in this function's pszPath parameter.

Note  Because schemas are specific to the machine and cannot be registered for each individual user, registering a file path under user profiles is not supported on Windows Vista.

If a full or partial failure is encountered that prevents a property description from being loaded, the cause is recorded in the application event log. This function fails with E_ACCESSDENIED if the calling context does not have proper privileges, which includes write access to HKEY_LOCAL_MACHINE. It is the responsibility of the calling application to obtain privileges through User Account Control (UAC) mechanisms.


Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]


Windows Desktop Search (WDS) 3.0






Propsys.dll (version 5.0 or later)



Community Additions

© 2015 Microsoft