Hi,
Create one Console based exe "KillMyExe" which has code to kill your exe.
like:
Code:
TFindProcess findProc;
findProc.Find(_L("MyRunningExe*"));
TFullName procName;
TInt err = findProc.Next(procName);
if (!err)
{
RProcess process;
err = process.Open(procName, EOwnerThread);
if (!err)
{
process.Kill(KErrCancel);
process.Close();
console->Write(_L("Exe Deleted!\n"));
console->Printf(_L("Command line args: \"%S\"\n"), &aArgs);
}
}
in KillMyExe.pkg file:
"C:\Symbian\9.1\S60_3rd_MR\Epoc32\release\gcce\urel\killmyexe.exe"-"!:\sys\bin\killmyexe.exe",
RR
Now in your MyRunningExe.pkg: add following entry for Embedded Sis
...........
...........
@"KillMyExe.sis",(0xe2e12345)
.....
"C:\Symbian\9.1\S60_3rd_MR\Epoc32\release\gcce\UREL\MyRunningExe.exe"-"!:\sys\bin\MyRunningExe.exe",FR,RI
@yucca: Is it a viable solution or will it have other consequnces? Please suggest.
Regards.
Kiran.