Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:25, 26 June 2008.

How to Launch an EXE and Pass Command Line Arguments

From Forum Nokia Wiki


_LIT(KAppPath, "c:\\system\\apps\\appname\\myapp.app");
_LIT(KParameters, "somearguments");
 
RFs fs;
User::LeaveIfError(fs.Connect());
CleanupClosePushL(fs);
TFindFile file(fs);
User::LeaveIfError(file.FindByDir(KAppPath,KNullDesC));
 
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
CleanupClosePushL(ls);
CApaCommandLine *cmd = CApaCommandLine::NewLC();
cmd->SetLibraryNameL(file.File());
// Passing parameters //
cmd->SetTailEndL(KParameters);
cmd->SetCommandL(EApaCommandRun);
User::LeaveIfError(ls.StartApp(*cmd));
 
CleanupStack::PopAndDestroy(3);
Related Discussions
Thread Thread Starter Forum Replies Last Post
Sign Application Package on Command Line alex_crowther Mobile Java Tools & SDKs 0 2003-11-02 17:16
function parameter Error-( TDes16 ) frownder General Symbian C++ 3 2006-10-25 07:22
problems with built-in FlashLite 3 Pasha Joymaker Flash Lite on Nokia Devices 5 2008-06-01 15:56
Tryng to launch an app via code on 3rd edition bytesm Symbian Signing, Certification and Security 5 2007-02-06 23:40
Unable to install on N82 bholowasia Symbian Signing, Certification and Security 22 2008-06-16 20:25
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX