Revision: 201025 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 15 Jul 2010 18:47:04 +0300
branchRCL_3
changeset 23 cd189dac02f7
parent 21 5bddc28da627
child 24 5cc91383ab1e
Revision: 201025 Kit: 2010127
appinstaller/AppMngr2/Sisx/inc/appmngr2sisxappinfo.h
appinstaller/AppMngr2/Sisx/src/appmngr2sisxappinfo.cpp
appinstaller/AppMngr2/group/appmngr2.mmp
appinstaller/AppMngr2/inc/appmngr2appui.h
appinstaller/AppMngr2/inc/appmngr2listview.h
appinstaller/AppMngr2/src/appmngr2appui.cpp
appinstaller/AppMngr2/src/appmngr2listview.cpp
installationservices/swi/group/bld.inf
installationservices/swi/group/sisregistryserver_legacy.mmp
installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.cpp
installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.h
installationservices/swi/source/sisregistry/server_legacy/sisregistryserverconst.h
installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp
installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.h
installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.cpp
installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.h
installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat
installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat
installationservices/swi/test/tdaemon/scripts/tdaemon.ini
installationservices/swi/test/tdaemon/scripts/tdaemon.script
installationservices/swi/test/tdaemon/scripts/tdaemon_winscw.script
installationservices/swi/test/testexes/packages/eclipsingdllupgradepu_on_c_and_emmc.pkg
installationservices/swi/test/testexes/packages/eclipsingdllupgradesa_on_c_and_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_distributed.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_distributed_NR.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t_NR.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_drive.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_pu_on_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_distributed.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_on_c.pkg
installationservices/swi/test/testexes/prepareexes.pl
installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.cpp
installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.h
installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxappinfo.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxappinfo.h	Thu Jul 15 18:47:04 2010 +0300
@@ -24,6 +24,7 @@
 #include <SWInstApi.h>                  // SwiUI::RSWInstLauncher
 #include <CUIDetailsDialog.h>           // SwiUI::CommonUI::CCUICertificateInfo
 #include <f32file.h>                    // TDriveUnit
+#include <swi/sisregistrysession.h>     // RSisRegistrySession
 
 
 class CAppMngr2SisxAppInfo : public CAppMngr2AppInfo
@@ -55,6 +56,7 @@
     void ShowDetailsL();
     void ReadCertificatesL();
     void HandleUninstallL( TRequestStatus& aStatus );
+    void CheckDRMContentL();
     
 private:    // data
     TUid iAppUid;
@@ -73,6 +75,8 @@
     RPointerArray<SwiUI::CommonUI::CCUICertificateInfo> iCertificates;
     TBool iCertsRead;
     TInt iCommandId;
+    TBool iRegSessionOpen;
+    Swi::RSisRegistrySession iSisRegSession;
     };
 
 #endif // C_APPMNGR2SISXAPPINFO_H
--- a/appinstaller/AppMngr2/Sisx/src/appmngr2sisxappinfo.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/Sisx/src/appmngr2sisxappinfo.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -62,6 +62,11 @@
     delete iDetails;
     delete iVendor;
     iCertificates.ResetAndDestroy();
+    
+    if ( iRegSessionOpen )
+        {
+        iSisRegSession.Close();
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -279,95 +284,13 @@
     if( trustLevel >= Swi::ESisPackageCertificateChainValidatedToTrustAnchor )
         {
         iIsTrusted = ETrue;
-        }
-
-    // If installed SIS package is DRM protected, find the protected file and
-    // save it's full name in iProtectedFile member variable for later use.
-    // Full name of the protected file is needed in ShowDetailsL() function
-    // to show the licence information.
-    RPointerArray<HBufC> files;
-    TRAPD( err, aEntry.FilesL( files ) );
+        }   
     
-    if( err == KErrNone )
-        {
-        CleanupResetAndDestroyPushL( files );
-        
-        // Use DRMUtility for DRM check. Utility class is much faster then
-        // IsDRMProtected function.        
-        DRM::CDrmUtility* utility = DRM::CDrmUtility::NewLC();
-                                     
-        for ( TInt fileIndex = 0; fileIndex < files.Count(); fileIndex++ )
-            {  
-#ifdef _DEBUG        
-            HBufC* tempName = files[ fileIndex ]; 
-            FLOG( "CAppMngr2SisxAppInfo::ConstructL, File name: %S", tempName );
-#endif        
-            RFile fileHandle;
-            TInt error = fileHandle.Open( iFs, *files[ fileIndex ], EFileRead );
-            FLOG( "CAppMngr2SisxAppInfo::ConstructL, File open error %d", 
-                    error );
-                       
-            if ( error == KErrNone )
-                {                
-                CleanupClosePushL( fileHandle );                
-                TInt err = KErrNone;
-                // We need to tarp this function since it may leave with some
-                // files which do not have enough data. If ConstrucL leaves
-                // package is not shown in UI.
-                TRAP( err, iIsDRMProtected = utility->IsProtectedL( fileHandle ) );
-           
-                if ( err )
-                    {
-                    // If we have leave let's handle this as not DRM procteded.
-                    iIsDRMProtected = EFalse;
-                    FLOG( "CAppMngr2SisxAppInfo, IsProtectedL error: %d", err );
-                    }
-                
-                CleanupStack::PopAndDestroy( &fileHandle ); 
-                
-                if ( iIsDRMProtected )
-                    { 
-                    FLOG( "CAppMngr2SisxAppInfo: File is DRM protected" );
-                
-                    HBufC* fileName = files[ fileIndex ];                                                
-                    iProtectedFile = fileName;  // takes ownership
-                    files.Remove( fileIndex );                    
-                    
-                    CDRMHelper* helper = CDRMHelper::NewLC();                    
-                    CDRMHelperRightsConstraints* playconst = NULL;
-                    CDRMHelperRightsConstraints* dispconst = NULL;
-                    CDRMHelperRightsConstraints* execconst = NULL;
-                    CDRMHelperRightsConstraints* printconst = NULL;            
-                    TBool sendingallowed = EFalse;
-                                    
-                    FLOG( "CAppMngr2SisxAppInfo: GetRightsDetailsL" );
-                    error = KErrNone;
-                    TRAP( error, helper->GetRightsDetailsL( *fileName, 
-                                                ContentAccess::EView, 
-                                                iIsRightsObjectMissingOrExpired, 
-                                                sendingallowed, 
-                                                playconst, 
-                                                dispconst, 
-                                                execconst, 
-                                                printconst ) );                     
-                    FLOG( "GetRightsDetailsL TRAP err = %d", error );
-                    
-                    delete playconst;
-                    delete dispconst;
-                    delete execconst;
-                    delete printconst;
-                    
-                    CleanupStack::PopAndDestroy( helper );
-                    
-                    FLOG( "iIsRightsObjectMissingOrExpired: %d", 
-                            iIsRightsObjectMissingOrExpired );                                        
-                    }
-                }
-            }                
-        CleanupStack::PopAndDestroy( utility );
-        CleanupStack::PopAndDestroy( &files );
-        }
-
+    iRegSessionOpen = EFalse;    
+    // iProtectedFile is allocated only in ShowDetails function.
+    iProtectedFile = NULL;                                                                         
+         
+    
     FLOG( "CAppMngr2SisxAppInfo::ConstructL, loc=%d, aug=%d, trust=%d, drm=%d, RO=%d",
             iLocation, iIsAugmentation, iIsTrusted, iIsDRMProtected,
             iIsRightsObjectMissingOrExpired );
@@ -382,9 +305,17 @@
     FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL()" );
     TRAP_IGNORE( ReadCertificatesL() );
 
-    CAppMngr2SisxInfoIterator* iterator = CAppMngr2SisxInfoIterator::NewL( *this,
-            EAppMngr2StatusInstalled );
+    CAppMngr2SisxInfoIterator* iterator = 
+            CAppMngr2SisxInfoIterator::NewL( *this,
+                                             EAppMngr2StatusInstalled );
     CleanupStack::PushL( iterator );
+    
+    // Let's check if installed SIS package is DRM protected.
+    // This check has been in constructor but it takes long time to check all 
+    // files for all installed packages so overall delay in UI is too long. 
+    // So we have move the DRM check into here.   
+    CheckDRMContentL();
+    
 
     FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, isDRM %d, noRightsObj %d, CertCount %d",
             iIsDRMProtected, iIsRightsObjectMissingOrExpired, iCertificates.Count() );
@@ -393,12 +324,17 @@
     TInt fileOpenError = KErrNone;
     if( iIsDRMProtected && !iIsRightsObjectMissingOrExpired )
         {
-        FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, iProtecteFile %S", iProtectedFile );
-        fileOpenError = fileHandle.Open( iFs, *iProtectedFile, EFileShareReadersOnly | EFileRead );
-        FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, fileOpenError %d", fileOpenError );
-        if( !fileOpenError )
+        if ( iProtectedFile )
             {
-            CleanupClosePushL( fileHandle );
+            FLOG( "ShowDetailsL, iProtecteFile %S", iProtectedFile );
+            fileOpenError = fileHandle.Open( iFs, 
+                                            *iProtectedFile, 
+                                            EFileShareReadersOnly | EFileRead );
+            FLOG( "ShowDetailsL, fileOpenError %d", fileOpenError );
+            if( !fileOpenError )
+                {
+                CleanupClosePushL( fileHandle );
+                }
             }
         }
 
@@ -529,3 +465,142 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// CAppMngr2SisxAppInfo::CheckDRMContentL()
+// ---------------------------------------------------------------------------
+//
+void CAppMngr2SisxAppInfo::CheckDRMContentL()
+    {
+    FLOG( "CAppMngr2SisxAppInfo::CheckDRMContentL");
+    TInt err = KErrNone;
+        
+    if ( !iRegSessionOpen )
+        {
+        err = iSisRegSession.Connect(); 
+        FLOG( "CheckDRMContentL, iSisRegSession.Connect err %d", err );
+        if ( err )
+            {
+            iRegSessionOpen = EFalse;
+            }
+        else
+            {
+            iRegSessionOpen = ETrue;
+            }        
+        }
+    
+    FLOG( "CheckDRMContentL, iRegSessionOpen = %d", err );
+    
+    if ( iRegSessionOpen )
+        {               
+        Swi::RSisRegistryEntry entry;                                     
+        err = entry.Open( iSisRegSession, iAppUid );
+        FLOG( "CheckDRMContentL, entry.Open err = %d", err );
+        
+        if ( !err )
+            {
+            CleanupClosePushL( entry );
+            
+            RPointerArray<HBufC> files;         
+            TRAP( err, entry.FilesL( files ) );
+            FLOG( "CheckDRMContentL, entry.FilesL err = %d", err );
+                                     
+            if( !err )
+                {
+                CleanupResetAndDestroyPushL( files );
+                
+                // Use DRMUtility for DRM check. Utility class is much faster
+                // then IsDRMProtected function.        
+                DRM::CDrmUtility* utility = DRM::CDrmUtility::NewLC();
+                                             
+                for ( TInt index = 0; index < files.Count(); index++ )
+                    {   
+                    RFile fileHandle;
+                    TInt error = fileHandle.Open( iFs, 
+                                                  *files[ index ], 
+                                                  EFileRead );
+                    FLOG( "CheckDRMContentL, File open error %d", error );
+                               
+                    if ( error == KErrNone )
+                        {                
+                        CleanupClosePushL( fileHandle );                
+                        err = KErrNone;
+                        // We need to tarp this function since it may leave with
+                        // some files which do not have enough data. If ConstrucL 
+                        // leaves package is not shown in UI.
+                        TRAP( err, iIsDRMProtected = 
+                                utility->IsProtectedL( fileHandle ) );
+                   
+                        if ( err )
+                            {
+                            // If we have leave let's handle this as not DRM 
+                            // procteded.
+                            iIsDRMProtected = EFalse;
+                            FLOG("CheckDRMContentL, IsProtectedL err %d",err);
+                            }
+                        
+                        CleanupStack::PopAndDestroy( &fileHandle ); 
+                        
+                        if ( iIsDRMProtected )
+                            { 
+                            FLOG("CheckDRMContentL: File is DRM protected");
+                        
+                            HBufC* fileName = files[ index ];                              
+                            // Let's alloc this only when DRM package is found.
+                            // KMaxFileName (256) sould be enoug for all 
+                            // file names.
+                            if ( iProtectedFile == NULL )
+                                {
+                                iProtectedFile = HBufC::NewL( KMaxFileName );    
+                                }
+                            // Let's copy filename to member because we dont know
+                            // for sure that pointer to sis registry entry is valid
+                            // after entry delete.
+                            if ( iProtectedFile )    
+                                {
+                                TPtr ptr = iProtectedFile->Des();
+                                ptr.Copy( *fileName );                                
+                                }  
+                            FLOG( "CheckDRMContentL: iProtecteFile %S", 
+                                    iProtectedFile );
+                            
+                            files.Remove( index );                    
+                            
+                            CDRMHelper* helper = CDRMHelper::NewLC();                    
+                            CDRMHelperRightsConstraints* playconst = NULL;
+                            CDRMHelperRightsConstraints* dispconst = NULL;
+                            CDRMHelperRightsConstraints* execconst = NULL;
+                            CDRMHelperRightsConstraints* printconst = NULL;            
+                            TBool sendingallowed = EFalse;
+                                            
+                            FLOG( "CheckDRMContentL: GetRightsDetailsL" );
+                            error = KErrNone;
+                            TRAP( error, helper->GetRightsDetailsL( 
+                                               *fileName, 
+                                               ContentAccess::EView, 
+                                               iIsRightsObjectMissingOrExpired, 
+                                               sendingallowed, 
+                                               playconst, 
+                                               dispconst, 
+                                               execconst, 
+                                               printconst ) );                     
+                            FLOG( "GetRightsDetailsL TRAP err = %d", error );
+                            FLOG( "iIsRightsObjectMissingOrExpired = %d", 
+                                    iIsRightsObjectMissingOrExpired );                            
+                            delete playconst;
+                            delete dispconst;
+                            delete execconst;
+                            delete printconst;                            
+                            CleanupStack::PopAndDestroy( helper );                                                                                      
+                            }
+                        }
+                    }                
+                CleanupStack::PopAndDestroy( utility );
+                CleanupStack::PopAndDestroy( &files );
+                }
+            CleanupStack::PopAndDestroy( &entry );
+            }                
+        }           
+    }
+
+// EOF
+
--- a/appinstaller/AppMngr2/group/appmngr2.mmp	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/group/appmngr2.mmp	Thu Jul 15 18:47:04 2010 +0300
@@ -93,6 +93,7 @@
 LIBRARY             appmngr2pluginapi.lib           // AppMngr2 Runtime API
 LIBRARY             ecom.lib                        // ECom
 LIBRARY             caf.lib                         // Content Access Framework
+LIBRARY             aknnotify.lib					// GlobalNote
 
 DEBUGLIBRARY        flogger.lib                     // RFileLogger
 
--- a/appinstaller/AppMngr2/inc/appmngr2appui.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/inc/appmngr2appui.h	Thu Jul 15 18:47:04 2010 +0300
@@ -44,9 +44,10 @@
     
 private:    // new functions
     static TInt DelayedConstructL( TAny* aSelf );
+    void CancelNoteL();
     
 private:    // from CAknViewAppUi
-    void HandleCommandL( TInt aCommand );
+    void HandleCommandL( TInt aCommand );    
 
 private:    // data
     CAppMngr2Model* iModel;
@@ -60,6 +61,8 @@
         } iDelayedConstructionStep;
     TBool iConstructInstallationFilesFirst;
     CAppMngr2ExitTimer* iExitTimer;
+           
+    TInt iNoteId;
     };
 
 #endif  // C_APPMNGR2APPUI_H
--- a/appinstaller/AppMngr2/inc/appmngr2listview.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/inc/appmngr2listview.h	Thu Jul 15 18:47:04 2010 +0300
@@ -26,7 +26,6 @@
 class CAppMngr2InfoBase;
 class CAknTitlePane;
 class CAknWaitDialog;
-class CAknInfoPopupNoteController;
 
 
 class CAppMngr2ListView : public CAknView
@@ -70,7 +69,6 @@
 
 private:    // data
     TInt iMiddleSoftkeyCommandId;
-    CAknInfoPopupNoteController* iInfoPopup;
     TBool iMaintainFocus;
     };
 
--- a/appinstaller/AppMngr2/src/appmngr2appui.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/src/appmngr2appui.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -32,6 +32,11 @@
 #include <featmgr.h>                    // FeatureManager
 #include <e32property.h>                // RProperty
 #include <hlplch.h>                     // HlpLauncher
+#include <StringLoader.h>               // StringLoader
+#include <appmngr2.rsg>                 // Resource IDs
+#include <AknGlobalNote.h>              // WaitNote
+#include <avkon.rsg>
+
 
 _LIT( KSWInstCommonUIResourceFileName, "SWInstCommonUI.rsc" );
 
@@ -58,6 +63,15 @@
     iResourceFileOffset = iEikonEnv->AddResourceFileL( *fullName );
     CleanupStack::PopAndDestroy( fullName );
 
+    // Let's start global wait note so user can see that 
+    // App. Mngr is scanning memory.
+    HBufC* string = StringLoader::LoadLC( R_QTN_AM_SCANNING_MEMORY );  
+    CAknGlobalNote* note = CAknGlobalNote::NewLC();
+    note->SetSoftkeys( R_AVKON_SOFTKEYS_EMPTY );    
+    FLOG( "CAppMngr2AppUi::ConstructL: ShowNoteL EAknGlobalWaitNote " );
+    iNoteId = note->ShowNoteL( EAknGlobalWaitNote, *string );
+    CleanupStack::PopAndDestroy( 2, string );
+                
     FLOG( "CAppMngr2AppUi::ConstructL, creting model" );
     iModel = CAppMngr2Model::NewL( iEikonEnv->FsSession(), *this );
 
@@ -110,14 +124,23 @@
 CAppMngr2AppUi::~CAppMngr2AppUi()
     {
     FLOG( "CAppMngr2AppUi::~CAppMngr2AppUi" );
+    
+    if( iNoteId )
+        {
+        // If appmngr is closed for some reason let's make sure 
+        // the note is closed.
+        TRAP_IGNORE( CancelNoteL() );
+        }
+    
     delete iIdle;
     delete iModel;
+    
     if( iResourceFileOffset > 0 )
         {
         iEikonEnv->DeleteResourceFile( iResourceFileOffset );
         }
     FeatureManager::UnInitializeLib();    
-    delete iExitTimer;
+    delete iExitTimer;   
     }
 
 // ---------------------------------------------------------------------------
@@ -140,6 +163,9 @@
         {
         CAppMngr2ListView* view = static_cast<CAppMngr2ListView*>( iView );
         TRAP_IGNORE( view->RefreshL( aMoreRefreshesExpected ) );
+        
+        // Let's close global wait note since memory scanning is ready.      
+        TRAP_IGNORE( CancelNoteL() );
         }
     }
 
@@ -154,6 +180,9 @@
         {
         CAppMngr2ListView* view = static_cast<CAppMngr2ListView*>( iView );
         TRAP_IGNORE( view->RefreshL( aMoreRefreshesExpected ) );
+        
+        // Let's close global wait note since memory scanning is ready. 
+        TRAP_IGNORE( CancelNoteL() );
         }
     }
 
@@ -255,3 +284,20 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// CAppMngr2AppUi::CancelNoteL()
+// ---------------------------------------------------------------------------
+//
+void CAppMngr2AppUi::CancelNoteL()
+    {
+    FLOG( "CAppMngr2AppUi::CancelNoteL: iNoteId = %d", iNoteId );
+     if ( iNoteId )
+         {         
+         CAknGlobalNote* note = CAknGlobalNote::NewLC();
+         FLOG( "CAppMngr2AppUi::CancelNoteL: note->CancelNoteL" );
+         note->CancelNoteL( iNoteId );         
+         CleanupStack::PopAndDestroy();       
+         iNoteId = 0;
+         }        
+    }
+
--- a/appinstaller/AppMngr2/src/appmngr2listview.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/appinstaller/AppMngr2/src/appmngr2listview.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -36,7 +36,6 @@
 #include <eikmenup.h>                   // CEikMenuPaneItem
 #include <akntitle.h>                   // CAknTitlePane
 #include <StringLoader.h>               // StringLoader
-#include <AknInfoPopupNoteController.h> // CAknInfoPopupNoteController
 #include <appmngr2.rsg>                 // Resource IDs
 
 const TUid KStatusPaneUid = { EEikStatusPaneUidTitle };
@@ -68,7 +67,6 @@
         AppUi()->RemoveFromViewStack( *this, iContainer );
         delete iContainer;
         }
-    delete iInfoPopup;
     }
 
 // ---------------------------------------------------------------------------
@@ -89,15 +87,7 @@
             StopDisplayingMenuBar();
             iMaintainFocus = EFalse;
             }
-
-        // Close progress note used in application startup
-        if( iInfoPopup && !aMoreRefreshesExpected )
-            {
-            iInfoPopup->HideInfoPopupNote();
-            delete iInfoPopup;
-            iInfoPopup = NULL;
-            }
-
+            
         FLOG( "CAppMngr2ListView::RefreshL() end" );
         }
     }
@@ -237,16 +227,7 @@
         }
     UpdateMiddleSoftkeyCommandL();
 
-    if( iInfoPopup == NULL )
-        {
-        iInfoPopup = CAknInfoPopupNoteController::NewL();
-        iInfoPopup->SetTimePopupInView( 0 );
-        iInfoPopup->HideWhenAppFaded( EFalse );
-        HBufC* noteText = StringLoader::LoadLC( R_QTN_AM_SCANNING_MEMORY );
-        iInfoPopup->SetTextL( *noteText );
-        CleanupStack::PopAndDestroy( noteText );
-        iInfoPopup->ShowInfoPopupNote();
-        }
+    // Note Infopopup is removed and replaced with wait dialog.         
     }
 
 // ---------------------------------------------------------------------------
@@ -263,11 +244,6 @@
         delete iContainer;
         iContainer = NULL;
         }
-    if( iInfoPopup )
-        {
-        delete iInfoPopup;
-        iInfoPopup = NULL;
-        }
     }
 
 // ---------------------------------------------------------------------------
--- a/installationservices/swi/group/bld.inf	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/group/bld.inf	Thu Jul 15 18:47:04 2010 +0300
@@ -221,6 +221,7 @@
 ../test/tsishelper/data/test1.data /epoc32/winscw/c/tswi/tsishelper/data/test1.data
 
 ../test/tdaemon/scripts/tdaemon.script /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon.script
+../test/tdaemon/scripts/tdaemon_winscw.script /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon_winscw.script
 ../test/tdaemon/scripts/tdaemon.ini /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon.ini
 
 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
@@ -1037,4 +1038,6 @@
 ../test/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.pkg /epoc32/winscw/c/tswi/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.pkg
 ../test/tuiscriptadaptors/scripts/testnoaiacert.sis /epoc32/winscw/c/tswi/tuiscriptadaptors/scripts/testnoaiacert.sis
 ../test/writableswicertstore/certs/some_swicertstore.dat /epoc32/winscw/c/tswi/certstore/some_swicertstore.dat
+../test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat /epoc32/winscw/c/tswi/tdaemon/scripts/setupforemmcformat_pre.bat
+../test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat /epoc32/winscw/c/tswi/tdaemon/scripts/setupforemmcformat_post.bat
 // End of file
--- a/installationservices/swi/group/sisregistryserver_legacy.mmp	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/group/sisregistryserver_legacy.mmp	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -40,6 +40,7 @@
 USERINCLUDE ../source/plan
 USERINCLUDE ../inc/swi 
 USERINCLUDE ../inc
+USERINCLUDE ../source/swis/server		    
 		    
 
 SOURCEPATH	../source/sisregistry
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -194,6 +194,11 @@
 		}
 	CleanupStack::Pop(&aPackages);
 	}
+
+const RPointerArray<CSisRegistryToken>& CSisRegistryCache::TokenList() const
+    {
+    return iTokens;
+    }
 	
 RFs& CSisRegistryCache::RFsHandle()
 	{ 
@@ -441,7 +446,7 @@
 			User::Leave(KErrCorrupt);	
 			}
 			
-		iTokens.AppendL(token);
+		iTokens.Append(token);
 		CleanupStack::Pop(token);
 		CleanupStack::PopAndDestroy(&fileStream);
 				
@@ -1412,7 +1417,7 @@
 	CleanupClosePushL(aDriveList);
 	aDriveList.Reset();
 	// a copy of the controller is always kept on drive C
-	aDriveList.AppendL(iSystemDrive);
+	aDriveList.Append(iSystemDrive);
 	
 	// only controllers will be written to removable media and 
 	// we have now to check for those 
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistrycache.h	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -72,6 +72,11 @@
 	 */
 	void PackageListL(RPointerArray<CSisRegistryPackage>& aPackages) const;
 	
+    /**
+     * Returns the current list of tokens.
+     */	
+	const RPointerArray<CSisRegistryToken>& TokenList() const;
+	
 	/**
 	 * Returns the current list of registered packages, even those on removable media
 	 */
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryserverconst.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryserverconst.h	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -50,7 +50,6 @@
 #include "sisrevocationmanager.h"
 #include "siscontroller.h"
 #include "siscertificatechain.h"
-
 #include "cleanuputils.h"
 #include "sisregistryutil.h"
 #include "sisinfo.h"
@@ -64,7 +63,7 @@
 #include "sisinstallblock.h"
 #include "sisregistryfiledescription.h"
 #include "sisregistrywritablesession.h"
-  
+#include "securitycheckutil.h" 
 
 using namespace Swi;
 
@@ -627,54 +626,60 @@
 	TPckg<TInt64> pkgTransactionID(transactionID);
 	aMessage.ReadL(EIpcArgument3, pkgTransactionID);
 	
-	// create a integrity service object
-    CIntegrityServices* integrityService = CIntegrityServices::NewLC(transactionID, KIntegrityServicesPath);
-	Server().Cache().RemoveRegistryEntryL(*object, *integrityService);
-
-	//If removal is for ROM upgrade type, 
-	//After removing the existing registry entry set,
-	//re generate the Registry Entry Cache. 
-	//If any of the ROM based stub doesn't have it's registry set 
-	//in appropriate path, it will create them (.reg & . ctl) 
-	//from the ROM based stub sis file.	
-	if ((object->InstallType() == Sis::EInstInstallation || 
-		 object->InstallType() == Sis::EInstPartialUpgrade) &&	
-		SisRegistryUtil::RomBasedPackageL(object->Uid()))
-		{	
-		Server().Cache().RegenerateCacheL();					
-		}		
-		
-	HBufC* logName = SisRegistryUtil::BuildLogFileNameLC();
-	
-	TDriveUnit sysDrive(RFs::GetSystemDrive());
-	TBuf<128> logDir = sysDrive.Name();
-	logDir.Append(KLogDir);
+	DeleteEntryL(*object, transactionID);	
 	
- 	if( SisRegistryUtil::FileExistsL(iFs,*logName))
-			{
- 			TInt sizeOfFile = 0;
- 			RFile file;
- 			User::LeaveIfError(file.Open(iFs,logDir,EFileRead));
- 			CleanupClosePushL(file);
- 			User::LeaveIfError(file.Size(sizeOfFile));
- 			RBuf8 text;
- 			text.CreateL(sizeOfFile);
- 			text.CleanupClosePushL();
- 			file.Read(text,sizeOfFile);
- 			file.Close();
- 			integrityService->RemoveL(*logName);
- 			User::LeaveIfError(file.Create(iFs,logDir,EFileWrite| EFileShareExclusive |EFileStream));
- 			User::LeaveIfError(file.Write(text,sizeOfFile));
- 			CleanupStack::PopAndDestroy(2,&file);
- 			}			
- 	integrityService->AddL(*logName);
- 	Server().Cache().AddLogEntryL(*object,ESwiLogUnInstall);	
- 	
- 	CleanupStack::PopAndDestroy(3, object);// object, integrityService , logName
-	
+	CleanupStack::PopAndDestroy(object);
 	aMessage.Complete(KErrNone);
 	}
 
+void CSisRegistrySession::DeleteEntryL(const CSisRegistryObject& aObject, TInt64 aTransactionId, TBool aRegenerateCache/*=ETrue*/)
+    {
+    // Create a integrity service object
+    CIntegrityServices* integrityService = CIntegrityServices::NewLC(aTransactionId, KIntegrityServicesPath);
+    Server().Cache().RemoveRegistryEntryL(aObject, *integrityService);
+
+    //If removal is for ROM upgrade type, 
+    //After removing the existing registry entry set,
+    //re generate the Registry Entry Cache. 
+    //If any of the ROM based stub doesn't have it's registry set 
+    //in appropriate path, it will create them (.reg & . ctl) 
+    //from the ROM based stub sis file. 
+    if ((aObject.InstallType() == Sis::EInstInstallation || 
+            aObject.InstallType() == Sis::EInstPartialUpgrade) &&  
+                SisRegistryUtil::RomBasedPackageL(aObject.Uid()) &&
+                    aRegenerateCache)
+        {   
+        Server().Cache().RegenerateCacheL();                    
+        }       
+            
+    HBufC* logName = SisRegistryUtil::BuildLogFileNameLC();
+    
+    TDriveUnit sysDrive(RFs::GetSystemDrive());
+    TBuf<128> logDir = sysDrive.Name();
+    logDir.Append(KLogDir);
+    
+    if( SisRegistryUtil::FileExistsL(iFs,*logName))
+        {
+        TInt sizeOfFile = 0;
+        RFile file;
+        User::LeaveIfError(file.Open(iFs,logDir,EFileRead));
+        CleanupClosePushL(file);
+        User::LeaveIfError(file.Size(sizeOfFile));
+        RBuf8 text;
+        text.CreateL(sizeOfFile);
+        text.CleanupClosePushL();
+        file.Read(text,sizeOfFile);
+        file.Close();
+        integrityService->RemoveL(*logName);
+        User::LeaveIfError(file.Create(iFs,logDir,EFileWrite| EFileShareExclusive |EFileStream));
+        User::LeaveIfError(file.Write(text,sizeOfFile));
+        CleanupStack::PopAndDestroy(2,&file);
+        }           
+    integrityService->AddL(*logName);
+    Server().Cache().AddLogEntryL(aObject,ESwiLogUnInstall);    
+        
+    CleanupStack::PopAndDestroy(2, integrityService);// logName,integrityService    
+    }
 void CSisRegistrySession::OpenRegistryUidEntryL(const RMessage2& aMessage)
 	{
 	// expects a UID as an arg 0
@@ -1693,14 +1698,87 @@
 
 void CSisRegistrySession::AddDriveL(const RMessage2& aMessage)
 	{
-	TInt drive;
-	TPckg<TInt> pkgDrive(drive);
+	TInt addedDrive;
+	TPckg<TInt> pkgDrive(addedDrive);
 	aMessage.ReadL(EIpcArgument0, pkgDrive);
 
-	DEBUG_PRINTF2(_L8("Sis Registry Server - Removable drive %d added."), drive);
-
+	DEBUG_PRINTF2(_L8("Sis Registry Server - Removable drive %d added."), addedDrive);
+	
+	// Get the drive character.
+	TChar drive;
+    User::LeaveIfError(iFs.DriveToChar(addedDrive, drive));
+    TUint driveChar(drive);
+    
+    // Retrieve drive info.
+    TDriveInfo driveInfo;
+    User::LeaveIfError(iFs.Drive(driveInfo, addedDrive));
+ 
+#ifndef __WINSCW__
+	if(driveInfo.iDriveAtt & KDriveAttLogicallyRemovable)
+	    {
+#endif	
+        /*
+	     In case a logically removable drive is added,
+	     Look for the presence of the first boot marker file corresponding to it in the sisregistry private
+	     folder in C drive. If absent, assume first boot and create the marker file. 
+	     Also added a marker file in the <drive>\sys\install directory which would be used to detect a format. 
+	     
+	     Subsequent boots would look for the drive format marker to check if a format has occured and delete
+	     the registry entries.
+        */
+	
+        // Create first boot marker path.
+	    _LIT(KFirstBootMarkerFilePath, "%c:%SfirstBootMarkerFileFor%c");
+	   
+	    RBuf privatePath;
+	    privatePath.CreateL(KMaxPath);
+	    CleanupClosePushL(privatePath);
+	    
+	    User::LeaveIfError(iFs.PrivatePath(privatePath));
+	   
+	    RBuf firstBootMarkerFilePath;
+	    firstBootMarkerFilePath.CreateL(KMaxPath);
+	    CleanupClosePushL(firstBootMarkerFilePath);
+	    
+	    TChar systemDrive = RFs::GetSystemDriveChar();
+	    firstBootMarkerFilePath.Format(KFirstBootMarkerFilePath, static_cast<TUint>(systemDrive), &privatePath, driveChar); 
+	    
+	    // Create drive format marker path.
+        _LIT(KFormatMarkerPath, "%c:\\sys\\install\\formatMarkerFile");
+	    
+        RBuf formatMarkerPath;
+        formatMarkerPath.CreateL(KMaxPath);
+	    CleanupClosePushL(formatMarkerPath);
+        formatMarkerPath.Format(KFormatMarkerPath, driveChar); 
+        
+        // The drive marker files are marked hidden and read-only.
+        TUint fileAttributes = KEntryAttReadOnly | KEntryAttHidden;
+        
+	    if(!SisRegistryUtil::FileExistsL(iFs, firstBootMarkerFilePath))
+	        {
+	        // First boot detected. Add the first boot marker file as well as the format marker on the drive.
+            SisRegistryUtil::CreateFileWithAttributesL(iFs, firstBootMarkerFilePath);
+            SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);
+	        }
+	    else
+	        {
+            // Subsequent boot. Check for the presence of a marker file <drive>\sys\install directory.
+            // If absent, assume format.
+            if(!SisRegistryUtil::FileExistsL(iFs, formatMarkerPath))
+                {
+                DriveFormatDetectedL(TDriveUnit(addedDrive));
+                //Add missing format marker file
+                SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);
+                }	        
+	        }
+	    
+	    CleanupStack::PopAndDestroy(3, &privatePath);
+#ifndef __WINSCW__	    
+	    }
+#endif	
+	
 	// update the drives state
-	Server().Cache().AddDriveAndRefreshL(drive);
+	Server().Cache().AddDriveAndRefreshL(addedDrive);
 	aMessage.Complete(KErrNone);
 	}
 
@@ -2255,3 +2333,103 @@
    
     CleanupStack::PopAndDestroy(&files);
     }
+
+void CSisRegistrySession::DriveFormatDetectedL(TDriveUnit aDrive)
+    {   
+    DEBUG_PRINTF2(_L("Sis Registry Server - Drive format detected for drive %d"), static_cast<TInt>(aDrive));
+    
+    //Get the list of tokens.    
+    const RPointerArray <CSisRegistryToken>& tokensArray = Server().Cache().TokenList();
+
+    TTime currentTime;
+    currentTime.UniversalTime();
+    TInt64 transactionId = currentTime.Int64();
+    
+    TBool regenerateCache = EFalse;
+    
+    TInt i(0);
+    
+    while(i < tokensArray.Count())
+        {
+        TUint installedDrives = tokensArray[i]->Drives();
+        
+        // Look for the formatted drive in the list of installed drives.
+        if(installedDrives & (1 << aDrive))
+            {
+            CSisRegistryObject* object = Server().Cache().ObjectL(*tokensArray[i]);
+			CleanupStack::PushL(object);
+            
+            if (!regenerateCache && 
+                    (object->InstallType() == Sis::EInstInstallation || object->InstallType() == Sis::EInstPartialUpgrade) &&
+                         SisRegistryUtil::RomBasedPackageL(object->Uid()))
+                {   
+                regenerateCache = ETrue;                   
+                }  
+            
+            // Retrieve all the associated files.
+            const RPointerArray<CSisRegistryFileDescription>& fileDescriptions = object->FileDescriptions();
+           
+            _LIT(KHashPathFormat, "%c:\\sys\\hash\\%S");
+            
+            for(TInt j=0; j<fileDescriptions.Count(); ++j)
+                {
+                const TDesC& targetPath = fileDescriptions[j]->Target();
+                DEBUG_PRINTF2(_L("File - %S "), &targetPath);
+                
+                // Get the drive on which the file is present.
+                TInt drive; 
+                User::LeaveIfError(RFs::CharToDrive(targetPath[0], drive));
+                
+                // If the file is a binary ( present in \sys\bin), delete the corresponding hash present in 
+                // C:\sys\hash               
+                
+                if(KErrNotFound != targetPath.FindF(KBinPath))
+                    {
+                    // Retrieve the filename from the target path.
+					TParsePtrC parser(targetPath); 
+                    HBufC* fileName = parser.NameAndExt().AllocLC();
+                                       
+                    TChar systemDrive = RFs::GetSystemDriveChar();
+                    
+                    // Create the hash file path.
+                    RBuf hashFilePath;
+                    hashFilePath.CreateL(KMaxPath);
+                    CleanupClosePushL(hashFilePath);
+                    hashFilePath.Format(KHashPathFormat, static_cast<TUint>(systemDrive), fileName);
+                    
+                    // Delete hash file.
+                    SisRegistryUtil::DeleteFile(iFs, hashFilePath); //Ignore return code. 
+                    
+                    CleanupStack::PopAndDestroy(2, fileName);
+                    
+                    }
+                
+                if(aDrive == TDriveUnit(drive))
+                    {
+                    // File should not exist on disk as the drive is assumed to have been formatted.
+                    continue;
+                    }
+                SisRegistryUtil::DeleteFile(iFs, targetPath); //Ignore return code.          
+                }
+            
+            // Delete registry entry.
+            DeleteEntryL(*object, transactionId, EFalse);
+            CleanupStack::PopAndDestroy(object);
+            }
+        else
+            {
+            // Increment only in case an entry is not found.
+            i++;
+            }
+        }
+    
+    if(regenerateCache)
+        {
+        Server().Cache().RegenerateCacheL();
+        }
+    
+    // Commit the changes.
+    CIntegrityServices* intServ = CIntegrityServices::NewLC(transactionId, KIntegrityServicesPath);
+    intServ->CommitL();
+    CleanupStack::PopAndDestroy(intServ);
+    }
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.h	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -140,6 +140,7 @@
 	// support for the writeable interface
 	void RegisterEntryL(const RMessage2& aMessage, TBool aNewEntry);	
 	void DeleteEntryL(const RMessage2& aMessage);
+	void DeleteEntryL(const CSisRegistryObject& aObject, TInt64 aTransactionId, TBool aRegenerateCache = ETrue);
 	void RequestDependenciesRegistryEntryL(const RMessage2& aMessage);
 	void RequestDependentPackagesRegistryEntryL(const RMessage2& aMessage);
 	void AddDriveL(const RMessage2& aMessage);
@@ -170,6 +171,7 @@
 	void LoggingFileInfoL(const RMessage2& aMessage);
 	void RequestMatchingSupportedLanguagesL(const RMessage2& aMessage);
 	void RequestInternalRegistryFilesL(const RMessage2& aMessage);
+	void DriveFormatDetectedL(TDriveUnit aDrive);
 private:
     friend class CSisRevocationManager;
 	RFs iFs;
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -124,6 +124,38 @@
 		}
 	}
 
+void SisRegistryUtil::CreateFileWithAttributesL(RFs& aFs, const TDesC& aPath, const TUint aAttributesMask)
+    {
+    // Creates the folder structure by ignoring the filename at the end.
+    EnsureDirExistsL(aFs, aPath);
+
+    RFile file;
+    CleanupClosePushL(file);
+    User::LeaveIfError(file.Create(aFs, aPath, EFileWrite));
+   
+    if(aAttributesMask != 0)
+        {
+        file.SetAtt(aAttributesMask, 0); // Ignoring return value.
+        }
+    CleanupStack::PopAndDestroy(&file);
+    }
+
+TInt SisRegistryUtil::DeleteFile(RFs& aFs, const TDesC& aPath)
+    {
+    TInt err = aFs.Delete(aPath);
+    
+    if(KErrNone != err)
+        {
+        DEBUG_PRINTF2(_L("Failed to delete file %S."), &aPath);
+        }
+    else
+        {
+        DEBUG_PRINTF2(_L("Deleted file %S successfully."), &aPath);
+        }
+    
+    return err;
+    }
+
 // Processes the ROM stub files. Retuns ETrue if the aUid or aName
 // is found in any of the ROM stub files, else returns EFalse.
 TBool SisRegistryUtil::RomBasedPackageL(const TUid& aUid)
--- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryutil.h	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -44,6 +44,8 @@
  	static HBufC* BuildControllerFileNameLC(TUid aUid, TInt aIndex, TInt aController);
  	static HBufC* BuildControllerFileNameLC(TUid aUid, TInt aIndex, TInt aController, TInt aDrive);
 	static void EnsureDirExistsL(RFs& aFs, const TDesC& aPath);
+	static void CreateFileWithAttributesL(RFs& aFs, const TDesC& aPath, const TUint aAttributesMask = 0);
+	static TInt DeleteFile(RFs& aFs, const TDesC& aPath);
 	static TBool RomBasedPackageL(const TUid& aUid);
 	static HBufC* BuildLogFileNameLC();
 	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+@ECHO Off
+
+set FILE=\epoc32\winscw\c\tswi\certstore\swicertstore.dat
+
+echo Installing SWI cert store data file from %FILE%
+
+mkdir \epoc32\release\winscw\udeb\z\resource\
+mkdir \epoc32\release\winscw\urel\z\resource\
+copy /y %FILE% \epoc32\release\winscw\udeb\z\resource\swicertstore.dat
+copy /y %FILE% \epoc32\release\winscw\urel\z\resource\swicertstore.dat
+
+del /s /f /q \epoc32\release\winscw\udeb\z\system\install\eclispingteststub.sis
+del /s /f /q \epoc32\release\winscw\urel\z\system\install\eclispingteststub.sis
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+@ECHO Off
+
+set FILE=\epoc32\winscw\c\tswi\certstore\swicertstore_sucert.dat
+
+echo Installing SWI cert store data file from %FILE%
+
+mkdir \epoc32\release\winscw\udeb\z\resource\
+mkdir \epoc32\release\winscw\urel\z\resource\
+copy /y %FILE% \epoc32\release\winscw\udeb\z\resource\swicertstore.dat
+copy /y %FILE% \epoc32\release\winscw\urel\z\resource\swicertstore.dat
+
+copy /y \epoc32\winscw\c\tswi\teclipsing\data\eclispingteststub.sis \epoc32\release\winscw\urel\z\system\install\eclispingteststub.sis
+copy /y \epoc32\winscw\c\tswi\teclipsing\data\eclispingteststub.sis \epoc32\release\winscw\udeb\z\system\install\eclispingteststub.sis
\ No newline at end of file
--- a/installationservices/swi/test/tdaemon/scripts/tdaemon.ini	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/test/tdaemon/scripts/tdaemon.ini	Thu Jul 15 18:47:04 2010 +0300
@@ -1,3 +1,138 @@
 [DriveWatcher]
 
 [Daemon]
+
+[InstallSA_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_base_on_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_c]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_drive.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_c_and_emmc]
+sis=z:\tswi\tsis\data\emmc_format_sp_distributed.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_sp_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallPU_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_pu_on_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_c]
+sis=z:\tswi\tsis\data\emmc_format_sp_on_c.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_c_and_T]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_and_t.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_distributed_drives]
+sis=z:\tswi\tsis\data\emmc_format_base_distributed.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSANR_on_distributed_drives]
+sis=z:\tswi\tsis\data\emmc_format_base_distributed_NR_sucert.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSANR_on_c_and_T]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_and_t_NR_sucert.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallEclipsingSA_on_c_and_emmc]
+sis=z:\tswi\tsis\data\eclipsingdllupgradesa_on_c_and_emmc_root5.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallEclipsingPU_on_c_and_emmc]
+sis=z:\tswi\tsis\data\eclipsingdllupgradepu_on_c_and_emmc_root5.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[u_Eclipsing]
+uid =802730A1
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+
+[u_Install]
+uid =8000887D
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[Check_files_exists_for_SA_after_emmc_format]
+numnonexist = 7
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000.reg
+nonexist4 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist5 = C:\sys\hash\runtestexe_app.exe
+nonexist6 = C:\sys\hash\console_app.exe
+
+[Check_files_exists_for_SA_after_T_dive_format]
+numexist = 7
+exist0 = c:\sys\bin\runtestexe_app.exe
+exist1 = c:\sys\bin\console_app.exe
+exist2 = x:\dummy.txt
+exist3 = C:\sys\install\sisregistry\8000887d\00000000.reg
+exist4 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+exist5 = C:\sys\hash\runtestexe_app.exe
+exist6 = C:\sys\hash\console_app.exe
+
+
+[Check_files_exists_for_SP_after_emmc_format]
+numnonexist=5
+nonexist0 = c:\sys\bin\console_app2.exe
+nonexist1 = x:\dummy.txt
+nonexist2 = C:\sys\install\sisregistry\8000887d\00000001.reg
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist4 = C:\sys\hash\console_app2.exe
+
+[Check_files_exists_for_Two_SP_after_emmc_format]
+numnonexist = 6
+nonexist0 = c:\sys\bin\console_app2.exe
+nonexist1 = x:\dummy.txt
+nonexist2 = x:\dummy1.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000001.reg
+nonexist4 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist5 = C:\sys\hash\console_app2.exe
+
+[Check_marker_files]
+numnonexist = 2
+nonexist0 = c:\private\102020DCE\firstbootmarkernonexistforx
+nonexist1 = x:\sys\install\formatmarker
+
+[Check_files_exists_for_SASP_after_emmc_format]
+numnonexist = 11
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000.reg
+nonexist4 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist5 = C:\sys\hash\runtestexe_app.exe
+nonexist6 = C:\sys\hash\console_app.exe
+nonexist7 = c:\sys\bin\console_app2.exe
+nonexist8 = C:\sys\install\sisregistry\8000887d\00000001.reg
+nonexist9 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist10 = C:\sys\hash\console_app2.exe
+
+[Check_files_exists_for_SA_on_C_and_T_after_emmc_format]
+numexist = 7
+exist0 = c:\sys\bin\runtestexe_app.exe
+exist1 = c:\sys\bin\console_app.exe
+exist2 = T:\dummy1.txt
+exist3 = C:\sys\install\sisregistry\8000887d\00000000.reg
+exist4 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+exist5 = C:\sys\hash\runtestexe_app.exe
+exist6 = C:\sys\hash\console_app.exe
+
+[Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format]
+numnonexist = 8
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000.reg
+nonexist4 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist5 = C:\sys\hash\runtestexe_app.exe
+nonexist6 = C:\sys\hash\console_app.exe
+nonexist7 = T:\dummy1.txt
--- a/installationservices/swi/test/tdaemon/scripts/tdaemon.script	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/test/tdaemon/scripts/tdaemon.script	Thu Jul 15 18:47:04 2010 +0300
@@ -15,6 +15,7 @@
 //
 
 LOAD_SUITE tdaemon
+LOAD_SUITE tuiscriptadaptors
 //! @file
 //! @SYMTestCaseID 		API-SEC-TDAEMON-0001
 //! @SYMTestStatus 		3. Released
@@ -25,3 +26,5 @@
 RUN_TEST_STEP 100 tdaemon DaemonStep z:\tswi\tdaemon\scripts\tdaemon.ini Daemon
 
 END_TESTCASE API-SEC-TDAEMON-0001
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/tdaemon_winscw.script	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,247 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE tdaemon
+LOAD_SUITE tuiscriptadaptors
+//! @file
+//! @SYMTestCaseID 		API-SEC-TDAEMON-0001
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-TDAEMON-0001
+
+RUN_TEST_STEP 100 tdaemon DriveWatcherStep z:\tswi\tdaemon\scripts\tdaemon.ini DriveWatcher
+RUN_TEST_STEP 100 tdaemon DaemonStep z:\tswi\tdaemon\scripts\tdaemon.ini Daemon
+
+END_TESTCASE API-SEC-TDAEMON-0001
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0001
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file(files distributed across C drive and emmc i.e 'X' Drive) and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0001
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_emmc_format
+END_TESTCASE API-SEC-CR_405-5166-0001
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0002
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with SP(files distributed across C drive and emmc i.e 'X' Drive) and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the SP package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0002
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SP_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0002
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0003
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with PU on emmc and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the complete package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0003
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallPU_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0003
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0004
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with two SP's both on emmc and format emmc.
+//! @SYMTestExpectedResults	Registry entries for bothe the sp's gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0004
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_Two_SP_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0004
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0005
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Unmount and mount emmc
+//! @SYMTestExpectedResults	No change in registry entries.
+
+START_TESTCASE API-SEC-CR_405-5166-0005
+RUN_TEST_STEP 100 tuiscriptadaptors MmcUnMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tuiscriptadaptors MmcMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+END_TESTCASE API-SEC-CR_405-5166-0005
+
+
+RUN_UTILS DeleteFile c:\private\102020DCA\firstbootmarkerfileforx
+RUN_UTILS DeleteFile x:\sys\install\formatmarker
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0006
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		After first boot of the device , marker files gets created on system drive(one for each emmc) and emmc
+//! @SYMTestExpectedResults	Marker files gets created on system drive(one for each emmc) and emmc successfuly
+
+START_TESTCASE API-SEC-CR_405-5166-0006
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_marker_files
+END_TESTCASE API-SEC-CR_405-5166-0006
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0007
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and t drive and format emmc.
+//! @SYMTestExpectedResults	No impact on the package 
+
+START_TESTCASE API-SEC-CR_405-5166-0007
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c_and_T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0007
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0008
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and t drive  then unmount T drive, format emmc and again mount x drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0008
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcUnMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0008
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0009
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and t drive  then  format emmc drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0009
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0009
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0010
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and format T drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0010
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_T_dive_format
+RUN_TEST_STEP tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0010
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0011
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA(NR) on c , x and t drive  then format emmc drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0011
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSANR_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0011
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0012
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA(NR) on c drive and t drive and format emmc.
+//! @SYMTestExpectedResults	No impact on the package 
+
+START_TESTCASE API-SEC-CR_405-5166-0012
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSANR_on_c_and_T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0012
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0013
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install a sis file SP(eclipsing) on c drive and x drive and format emmc.
+//! @SYMTestExpectedResults	SP should be removed amd we will revert back to stubs 
+
+START_TESTCASE API-SEC-CR_405-5166-0013
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallEclipsingSA_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Eclipsing
+END_TESTCASE API-SEC-CR_405-5166-0013
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0014
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install a sis file SP(eclipsing) on c drive and x drive and format emmc.
+//! @SYMTestExpectedResults	SP should be removed amd we will revert back to stubs 
+
+START_TESTCASE API-SEC-CR_405-5166-0014
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallEclipsingPU_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+DELAY 2000
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Eclipsing
+END_TESTCASE API-SEC-CR_405-5166-0014
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0008
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on emmc drive and then upgrade it with SP both on c drive and format emmc.
+//! @SYMTestExpectedResults	Registry entries for the complete package gets cleaned
+
+//START_TESTCASE API-SEC-CR_405-5166-0008
+//RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_emmc
+//RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_c
+//RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+//RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SASP_after_emmc_format
+//RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+//END_TESTCASE API-SEC-CR_405-5166-0008
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/eclipsingdllupgradepu_on_c_and_emmc.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,25 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+&EN
+
+#{"Dll Upgrade PU"},(0x802730A1), 1,2,4, TYPE=PU,RU
+
+%{"Crypto Services"}
+:"Crypto Services"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\eclipsetest2.dll"-"c:\sys\bin\eclipsetest.dll"
+"packages\simpletextfile.txt"-"x:\mimehandler.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/eclipsingdllupgradesa_on_c_and_emmc.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,25 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+&EN
+
+#{"Dll Upgrade PU"},(0x802730A1), 1,2,4, TYPE=SA,RU
+
+%{"Crypto Services"}
+:"Crypto Services"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\eclipsetest2.dll"-"c:\sys\bin\eclipsetest.dll"
+"packages\simpletextfile.txt"-"x:\mimehandler.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_distributed.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt"
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_distributed_NR.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SA,RU,NR
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt"
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_on_c_and_t"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t_NR.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_on_c_and_t_NR"}, (0x8000887D), 1, 2, 3,TYPE=SA,RU,NR
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_drive.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_on_c_drive"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_emmc.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_base_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt" 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_pu_on_emmc.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_pu_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=PU
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"packages\simpletextfile.txt"-"X:\dummy.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_distributed.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,27 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_sp_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_longrun_forpackage.exe"-"c:\sys\bin\console_app2.exe"
+"packages\simpletextfile.txt"-"X:\dummy.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_emmc.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_sp_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"packages\simpletextfile.txt"-"X:\dummy1.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_on_c.pkg	Thu Jul 15 18:47:04 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+&EN
+
+;Header
+#{"emmc_format_sp_on_c"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_longrun_forpackage.exe"-"c:\sys\bin\console_app2.exe"
\ No newline at end of file
--- a/installationservices/swi/test/testexes/prepareexes.pl	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/test/testexes/prepareexes.pl	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -715,6 +715,8 @@
 SignFile("hiddensa.sis", "hiddensa_root5.sis", "root5ca", \*iby);
 
 SignFile("smlsyncagent.sis", "smlsyncagent_root5.sis", "root5ca", \*iby);
+SignFile("eclipsingdllupgradepu_on_c_and_emmc.sis", "eclipsingdllupgradepu_on_c_and_emmc_root5.sis", "root5ca", \*iby);
+SignFile("eclipsingdllupgradesa_on_c_and_emmc.sis", "eclipsingdllupgradesa_on_c_and_emmc_root5.sis", "root5ca", \*iby);
 
 #Swi Support for RFS
 SignFile("swi_rfs_test_SA.sis", "swi_rfs_test_SA_root5.sis", "root5ca", \*iby);
@@ -784,6 +786,8 @@
 SignFileWithSpecifiedCert("rusaruupgrade_purunr.sis", "rusaruupgrade_purunr_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("rusastubupgrade_punrru.sis", "rusastubupgrade_punrru_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("ruromupgraderucertsa_protectedsid.sis", "ruromupgraderucertsa_protectedsid_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("emmc_format_base_distributed_NR.sis", "emmc_format_base_distributed_NR_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("emmc_format_base_on_c_and_t_NR.sis", "emmc_format_base_on_c_and_t_NR_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 
 # new tests for media propagation of packages signed by SU.
 
--- a/installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.cpp	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.cpp	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -128,3 +128,69 @@
 	SetTestStepResult(EPass);	
 	return TestStepResult();
 	}
+
+
+CSwiFileExistsStep::CSwiFileExistsStep()
+    {
+    SetTestStepName(KSwiFileExistsStep);
+    }
+
+
+TVerdict CSwiFileExistsStep::doTestStepL()
+    {
+    SetTestStepResult(EFail);
+    
+    RTestUtilSessionSwi testUtil;
+    User::LeaveIfError(testUtil.Connect());
+    CleanupClosePushL(testUtil);
+    
+    _LIT(KNoOfFiles, "FilesCount");
+    _LIT(KFile, "File");
+    
+    TInt filesCount(0);
+    GetIntFromConfig(ConfigSection(), KNoOfFiles(), filesCount);
+    
+    if(filesCount == 0)
+        {
+        User::Leave(KErrArgument);
+        }
+    
+    for(TInt i=0; i<filesCount; ++i)
+        {
+        TBuf<12> file;
+        file = KFile;
+        GenerateIndexedAttributeNameL(file, filesCount);
+        
+        TPtrC fileName;
+        GetStringFromConfig(ConfigSection(), file, fileName);
+        
+        HBufC* fileNameBuf = fileName.AllocLC();
+        TBool result= testUtil.FileExistsL(*fileNameBuf);
+        
+        if(!result)
+            {
+            INFO_PRINTF2(_L("File not found - %S ."), fileNameBuf);
+            CleanupStack::PopAndDestroy(fileNameBuf);
+            return TestStepResult();
+            }
+        else
+            {
+            INFO_PRINTF2(_L("File exists -  %S ."), fileNameBuf);
+            CleanupStack::PopAndDestroy(fileNameBuf);
+            }
+        }
+    
+    CleanupStack::PopAndDestroy(&testUtil);
+    
+    SetTestStepResult(EPass);
+    return TestStepResult();
+    }
+
+
+void CSwiFileExistsStep::GenerateIndexedAttributeNameL(TDes& aInitialAttributeName, TInt aIndex)
+    {
+    const TInt MAX_INT_STR_LEN = 8;
+    TBuf<MAX_INT_STR_LEN> integerAppendStr;
+    integerAppendStr.Format(_L("%d"), aIndex);
+    aInitialAttributeName.Append(integerAppendStr);
+    }
--- a/installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.h	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/swifileutilitysteps.h	Thu Jul 15 18:47:04 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -25,6 +25,7 @@
 
 _LIT(KSwiCopyFilesStep, "SwiCopyFilesStep");
 _LIT(KSwiDeleteFilesStep, "SwiDeleteFilesStep");
+_LIT(KSwiFileExistsStep, "SwiFileExistsStep");
 
 class CSwiCopyFilesStep : public CTestStep
 	{
@@ -42,6 +43,16 @@
 
 	};
 
+class CSwiFileExistsStep : public CTestStep
+    {
+public:
+    CSwiFileExistsStep();
+    TVerdict doTestStepL();
+    
+private:
+    void GenerateIndexedAttributeNameL(TDes& aInitialAttributeName, TInt aIndex);
+
+    };
 
 
 #endif //SWIFILEUTILITYSTEPS_H
--- a/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Mon Jun 21 15:48:28 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Thu Jul 15 18:47:04 2010 +0300
@@ -146,6 +146,8 @@
 
 TESTEXECUTE, \logs\testexecute\testnoaiacert_ocspmandatory.htm,, \tswi\tuiscriptadaptors\scripts\testnoaiacert_ocspmandatory.script, 100, UDEB#UREL, \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\batchfiles\testnoaiacert_ocspmandatory_pre.bat, \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\batchfiles\testnoaiacert_ocspmandatory_post.bat
 
+TESTEXECUTE, \logs\testexecute\tdaemon_winscw.htm,, \tswi\tdaemon\scripts\tdaemon_winscw.script, 300, UDEB#UREL, \epoc32\winscw\c\tswi\tdaemon\scripts\setupforemmcformat_pre.bat, \epoc32\winscw\c\tswi\tdaemon\scripts\setupforemmcformat_post.bat
+
 TESTEXECUTE, \logs\testexecute\testrun.htm,, \tswi\tuiscriptadaptors\scripts\testrun.script, 300, UDEB#UREL, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy_shortrunwait.ini, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy.ini
 TESTEXECUTE, \logs\testexecute\testrunft.htm,, -Dstartupmode=1 -- \tswi\tuiscriptadaptors\scripts\testrunft.script, 300, UDEB#UREL, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy_shortrunwait.ini,