Geoff Chappell - Software Analyst
This function executes a registry command specified indirectly by a key, subkey and verb.
HRESULT RunIndirectRegCommand ( HWND hWnd, HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszVerb);
The hWnd argument provides the window handle to use for message boxes while trying to execute the command.
The hKey argument provides a handle to an open registry key.
The pszSubKey argument provides the address of a null-terminated string that names a subkey for the indirect registry command.
The pszVerb argument provides the address of a null-terminated string that names a verb under which to find the registry command.
The function returns zero for success, else an error code.
The function uses RunRegCommand to execute whatever registry command is found from the key key\subkey\default\shell\verb\command, where
This function generalises SHRunIndirectRegClientCommand, to allow a key\subkey pattern other than HKEY_LOCAL_MACHINE\Software\Clients\ClientType and a verb other than Open.
The RunIndirectRegCommand function is exported from SHLWAPI as ordinal 468 in late builds of version 5.00 and then in all higher versions.
Though this function dates from as long ago as 2000, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.