×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    12

    [moved] unable to execute program for security reasons

    Hi,

    If I add 'UserEnvironment' capability to my program , then whenever I try to run media file stored in "\\System\\Apps" folder through my program ,I get warning tht "unable to execute program for security reasons" but media files do run.Wt could be reason for the same.
    Please note that I don't get any such warning if I do not add 'UserEnvironment' capability to mmp.
    I need UserEnvironment' capabiltiy to use record voice.

    Regards,
    brewwindow

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    How excatly are you trying to run the media files ?

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    Hi,

    I am using 'CMdaAudioPlayerUtility' to play media files and 'CMdaAudioRecorderUtility' is the one I am using to record voice.

    Regards,
    brewwindow

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    So what is the code line that gives the error ?, also what is the path where you are trying to play the files from ?

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    I am getting warning popup when I try to play media file (though it runs successfully) from \\System\\Apps\\uuid_abc.mp3 .
    I was playing files successfully from this path until I added 'UserEnvironment' capability to mmp

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    That definetely should not happen, I never seen adding capabilities causing this error, since it is related to missing capabilities, not excess capabilities. anyway playing a file from non-protected folder should not require any capability. Anyway it would always good idea to actually specify the drive as well, most often in device any paths with no drive letter will fail completely.

    I would actually suggest you to check a bit more on which actual line is causing the error.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,693

    Re: unable to execute program for security reasons

    If you also have .dll-s in your project, they will also need all capabilities which the .exe has.

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    Hi,
    I rechecked with my old code which runs smoothly after uor reply and just added 'UserEnvironment' to the capability list in it .
    Here also I get error popup
    'Unable to execute file for security reasons' when I try t run media file stored in c:\\System\\Apps\\uuid_abc.mp3 .

    regards

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    Can you then show the code you are using, simply opening a audio file from non-protected folders should not give this error. The wizard's dll thing was good catch, so are you using any custom libaries on your project ?

  10. #10
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    No I am not using dll in project. I am putting up piece of code to run media and how I read from c:\\System\\Apps\\uuid_abc.mp3



    iMdaPlayer= CMdaAudioPlayerUtility::NewL(*this, EMdaPriorityNormal,
    EMdaPriorityPreferenceTimeAndQuality);

    iMdaPlayer->UseSharedHeap();
    iMdaPlayer->OpenFileL(iFile->Des());
    iMdaPlayer->SetRepeats(KMdaRepeatForever, 0);
    iMdaPlayer->Play();

    //////////////////////////////////
    iFile is populted as


    TParse parse;
    TFileName appPath;
    TBuf <5> appDrive;
    parse.Set(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName(), NULL, NULL );
    appDrive.Copy(parse.Drive());
    TBuf<200> buf;
    buf.Copy(appDrive);
    buf.Append(_L16("\\System\\Apps\\"));
    buf.Append(Utils::app_uid);
    buf.Append(_L16("_"));
    buf.Append(_L16("abc.mp3"));

  11. #11
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    I never used UseSharedHeap, so maybe you could just remove that. Also you can not call play untill the callback for the opening is called with KErrNone.

  12. #12
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    UseSharedHeap did't helped and I am calling play on callback only as I have mentioned everything works fine without ...UserEnvironment' capability.

  13. #13
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: unable to execute program for security reasons

    It definetely should never work, since you can not call Play, untill teh file has been opened, anyway, if you are happy how it works without the UserEnvironment, then just don't have it. What was the original requirement on having it ?

  14. #14
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    I am using play only on callback, something like this
    Media::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration)
    {
    if(iMdaPlayer && aError == KErrNone)
    {
    installationComplete = true;
    if(iLoopCount>0)
    iMdaPlayer->SetRepeats(iLoopCount, 0);
    else if(iLoopCount == -1)
    iMdaPlayer->SetRepeats(KMdaRepeatForever, 0);

    if(playedBeforeinstallation)
    {
    isBeingPlayed = true;
    iMdaPlayer->Play();
    setVolume(iVolume);
    playedBeforeinstallation = false;
    }
    }


    I need this capability to use 'CMdaAudioRecorderUtility'.

    Regards,
    brewwindow

  15. #15
    Registered User
    Join Date
    May 2010
    Posts
    12

    Re: unable to execute program for security reasons

    exact piece of code which actually causing error pop-up is

    iMdaPlayer->OpenFileL(iFile->Des());

Similar Threads

  1. [moved] Unable to execute file for security reasons
    By s60newbie in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2010-09-05, 13:44
  2. [Moved] Unable to execute for security reasons
    By fhatzis in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 12
    Last Post: 2010-05-03, 13:28
  3. [moved] unable to execute files due to security reasons
    By prateekprithvi in forum Symbian
    Replies: 2
    Last Post: 2008-08-01, 07:21
  4. Unable to execute for security reasons
    By miriwiri in forum Symbian
    Replies: 7
    Last Post: 2007-12-07, 05:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×