i can run APP application in the MDL autostart file, but i can not run exe Application, please help me! thanks
i can run APP application in the MDL autostart file, but i can not run exe Application, please help me! thanks
Try RProcess::Create, Resume, Close. Test on target device, autostart on emulator is a different story.
Hello dear,
U absolutely can run an exe from autostart.
U need to grab one UID from application wizard n right from there abort the creation of that application.
1)Now paste this UID in yr exe's MMP file n in UId file.
2)Then Paste this UID at : starter_uid
3)Pass yr exe path at:fnAppPath
4)Restart yr Phone.
5)It's time to party man.
.....
....
...
void CclAutostart::StartAppThreadFunctionL()
{
#ifdef __WINS__
const TUid starter_uid= { 0x05CCC0B0 };
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
CleanupClosePushL(ls);
_LIT(filen, ""); // dummy
TThreadId dummy;
User::LeaveIfError( ls.StartDocument(filen, starter_uid, dummy) );
CleanupStack::PopAndDestroy();
#else
TFileName fnAppPath = _L("\\system\\apps\\starter\\starter.exe");
RProcess server;
CleanupClosePushL(server);
User::LeaveIfError(server.Create(fnAppPath, _L("")));
server.Resume();
CleanupStack::PopAndDestroy();
#endif
}
Regards,
Kiran.
Hi Kiran,
Your code seems to work great both on device and Emulator.
My problem is while installing the pkg file on device it should always be installed on the phone memory.
Which need not be the case. The user can install it on the MMC as well.
How can I ensure that the recognizer looks for the exe in the installed directory and not just C:.
Thanks & Regards.
Hello dear,
Check out the following link:
http://discussion.forum.nokia.com/fo...ad.php?t=85731
I hope it will help u.
Regards.
Kiran.
Thanks Kiran.
I already tried that.
http://discussion.forum.nokia.com/fo...=Autostart+mmc
Hi!
U can use the namespace NEikonEnvironment if u r using 2nd edition
U can use NEikonEnvironment::ApplicationDriveAndPath() for ur purpose.
See the SDK for more details.
Hope this helps u.
Regards,
Shilpa Kulkarni
Hi Shilpa,
That wont help me because I need to search for an exe.
NEikonEnvironment::ApplicationDriveAndPath() will return me the address
of my recognizer.
Regards,
Tina
In practice it will not. NEikonEnvironment uses your ...AppUi class, and recognizers have not got one (they are not applications anyway, thus ApplicationDriveAndPath or CompleteWithAppPath have nothing to do with them).Originally Posted by Tina_Tibrewal
Try using TFindFile::FindByDir to locate a file with known name and path but unknown drive.
Thanks a lot Wizard_Hu..
FindByDir() Solved the problem.