×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    How to get list with installed sis files

    Hello,
    I would like to get the package names of all installed applications, is there a way to do that?

    I can get a list with all installed applications (with RApaLsSession), but this is not the same as all installed sis files.
    I need to know each application to which sis file belongs, is there a public API for that?

    Thanks!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to get list with installed sis files

    Generally the API (SWI registry or something similar) is not public. Of course it is present in the open source Symbian^3 code, but for S60 devices you will probably have to get it via the Technical Support.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Re: How to get list with installed sis files

    Thank you wizard!

    Can you the location of SWI registry API in Symbian^3 (I have pdk3)?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: How to get list with installed sis files

    You could try different search applications to locate it, for example I often use Agent Ransak for searching stuff inside files systems.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to get list with installed sis files

    Having a simple file list also helps a lot (dir /s /b), since the files will probably contain swi in their filenames - just like the SWI Installer API does from the plug-in packs.

  6. #6
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Re: How to get list with installed sis files

    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;
    }

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to get list with installed sis files

    Quote Originally Posted by microsoft2 View Post
    Unfortunately some executable s - 'matrixmenu.exe' 'akncapserver.exe' are not found in any package.
    That is normal. Although there may be, and probably are, some stub installers in the ROM, allowing to upgrade certain components via simple installation (common examples are the Open C/C++ libraries, perhaps the Qt runtime - but the N-Gage client app also worked in a similar way while it existed), most parts of the OS are changed via firmware updates.

Similar Threads

  1. how can I get the installed application list in s40
    By lilin1lilin in forum Mobile Java General
    Replies: 6
    Last Post: 2010-10-18, 09:06
  2. Replies: 6
    Last Post: 2010-01-14, 16:41
  3. how to get installed name of sis
    By wsh604 in forum Symbian
    Replies: 19
    Last Post: 2007-12-06, 11:29
  4. how to get the installed application list ??
    By shadi.alalem in forum Symbian
    Replies: 3
    Last Post: 2007-02-26, 22:54
  5. Replies: 1
    Last Post: 2004-04-29, 20:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×