hi all
I want to uninstall my application programmaticly from the mobile and i used this code then made some modification to it but nothing occur
http://wiki.forum.nokia.com/index.ph...ogrammatically
my code
void CreinstallContainerView::UninstallSisL()
{
RFs fileSession;
CDir* dirList;
TInt i;
TFileName fullPath;
TUint contextUid;
TFileName fileName;
_LIT(KDirName1, "c:\\system\\install\\registry\\");
_LIT(KFileSpec1,"c:\\system\\install\\registry\\AlMosaly");

User::LeaveIfError( fileSession.Connect() );
CleanupClosePushL( fileSession );

// Get the file list, sorted by name
User::LeaveIfError( fileSession.GetDir( KFileSpec1,
KEntryAttMaskSupported,
ESortByName, dirList ) );
CleanupStack::PushL(dirList);

for ( i=0; i < dirList->Count(); i++ )
{
fileName = (*dirList)[i].iName;
if( fileName.Compare(_L("Application name")) == KErrNone )
{
continue;
}

fullPath = KDirName1;
fullPath.Append(fileName);
RFile lFile;
TInt err = lFile.Open( fileSession, fullPath, EFileShareAny | EFileRead );

if(err == KErrNone)
{
TInt lSize;
lFile.Size(lSize);
RBuf8 lBuf;
lBuf.Create(lSize);
lBuf.CleanupClosePushL();
lFile.Read(lBuf);//read contents into buffer
RBuf buff;
buff.Create(lSize);
buff.CleanupClosePushL();
buff.Copy(lBuf);//Copy into 16 bit buffer
lFile.Close();
if (err == KErrNone)
{
// Check for MIDlet name in the file
err = buff.Find(_L("Application name.sis"));
if (err != KErrNotFound)
{
TLex lex( fileName.Mid(0,8) );
lex.Val( contextUid, EHex );
SwiUI::RSWInstSilentLauncher inst;
inst.Connect();
SwiUI::TUninstallOptions options;
SwiUI::TUninstallOptionsPckg optionsPckg;
options.iKillApp = SwiUI::EPolicyAllowed;
options.iBreakDependency = SwiUI::EPolicyAllowed;
optionsPckg = options;
TInt resp = inst.SilentUninstall( TUid::Uid(contextUid),
optionsPckg,
SwiUI::KSisMimeType );
if(resp==1)
{ TBuf<300> c;
c = (GetNote('%'));
RunConfQuery1L(&c);
}

inst.Close();


}
}
CleanupStack::PopAndDestroy(2); // buff, lBuf
}
}
CleanupStack::PopAndDestroy(2); // dirList, fileSession
}
I added the required API,libraries,and run it in the device directly
what is the problem ????