Friday, September 08, 2006

Running EXE file on S60 3rd Edition

This code only works on S60 3rd Edition.
You can use it to invoke an executable from with your application. Make sure you cleanup after yourself and don't leave any rouge applications running in the background.


RProcess server;
server.Create(KServerName, KNullDesC);

CApaCommandLine* commandLine = CApaCommandLine::NewL();
commandLine->SetExecutableNameL(KExecutableName);
commandLine->SetProcessEnvironmentL(server);

RApaLsSession ApaSession;
ApaSession.Connect();
ApaSession.StartApp(*commandLine);
ApaSession.Close();

delete commandLine;

1 comment:

Anonymous said...

Very nice sample. But what is this KServerName that is used with Create?