Thank you both for your help!
I am now using Agent Ransak
BTW is there some utility that you are using that can cache the whole pdk folder and search faster?
What I found is a class RSisRegistrySession in swi\sisregistrysession.h, the libraries provided in pdk3 also works on 5800 XM
Just to complete the thread, I am attaching some example code than I am using. Unfortunately some executable s - 'matrixmenu.exe' 'akncapserver.exe' are not found in any package, but I am interested only in 3rd parties sis files.
Code:
#include <sisregistrysession.h>
#include <sisregistryentry.h>
TBool GetInstallPkgUidAndNameL( const TDesC& aAppFullName, TUid& aPackageUid, TDes& aPackageName, TBool aLogAll )
{
LOG_FUNCTION_F( _L("%S"), &aAppFullName );
// Search for the full name of the application amongst every file name in
// every installed packages.
TBool found = EFalse;
Swi::RSisRegistrySession iSisRegSession;
// Get the array of ids of every installed packages
if( KErrNone != iSisRegSession.Connect() )
{
LOG_WRITE("error connecting");
return found;
}
CleanupClosePushL( iSisRegSession );
RArray<TUid> packageIds;
CleanupClosePushL( packageIds );
iSisRegSession.InstalledUidsL( packageIds );
RPointerArray< HBufC > packageFiles;
CleanupClosePushL( packageFiles );
LOG_FORMAT( _L("%d packages found"), packageIds.Count() );
for( TInt i = 0; i < packageIds.Count() && !found; ++i )
{
const TUid packageId = packageIds[i];
Swi::RSisRegistryEntry packageEntry;
// Get the array of file names in the current install package and look
// if there is one suggesting that the application was installed from
// the package.
if( KErrNone == packageEntry.Open( iSisRegSession, packageId ) )
{
CleanupClosePushL( packageEntry );
packageEntry.FilesL( packageFiles );
if( aLogAll )
LOG_FORMAT( _L("Package 0x%08x"), packageId );
if( aLogAll )
{
RArray<TUid> sids;
packageEntry.SidsL( sids );
LOG_FORMAT( _L("Sids: %d"), sids.Count() );
for( TInt i = 0; i < sids.Count(); ++i )
{
//TODO: search by sids should be enough
LOG_FORMAT( _L("0x%08x"), sids[i] );
}
}
if( aLogAll )
LOG_FORMAT( _L("Files %d"), packageFiles.Count() );
for( TInt pf = 0; pf < packageFiles.Count() && !found; ++pf )
{
if( packageFiles[pf]->FindC( aAppFullName ) == 0 )
{
aPackageUid = packageId;
HBufC* pkgName = packageEntry.PackageNameL();
CleanupStack::PushL( pkgName );//+pkgName
aPackageName.Copy( pkgName->Des().Left( aPackageName.MaxLength() ) );
CleanupStack::PopAndDestroy();//-pkgName
LOG_FORMAT( _L("found, 0x%08x; %S"), packageId, &aPackageName );
found = ETrue;
}
}
packageFiles.ResetAndDestroy();
CleanupStack::PopAndDestroy( &packageEntry );
}
}
CleanupStack::PopAndDestroy( &packageFiles );
CleanupStack::PopAndDestroy( &packageIds );
CleanupStack::PopAndDestroy( &iSisRegSession );
return found;
}