×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    PKG File: executing an exe with command line arguments

    Hi,

    Is possible to specify the command line arguments that are passed to the installed executable marked with FR flag for running then during installations. And it is possible then can we bind that argument to an option list. Lets say i display an option list.
    !(("Register via GPRS"), ("Register via SMS"))

    ;Copy the registration stub and pass it reg arguments
    "register.exe"-"C:\private\10000005\import\register.exe" option1 option2, FR

    SDK: S60 3rd Edition FP1
    IDE: Carbide Express 1.2

    Regards,
    Vaibhav

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

    Re: PKG File: executing an exe with command line arguments

    Nope but you can make two executables from which one is selected according to the users choice.

    yucca

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    Re: PKG File: executing an exe with command line arguments

    oh... it was really disappointing to hear that. If can run an executable during installation then we shall also be able to give it some command line params.

    Anyways it seems that i only have two options left.

    1. Branch the execution based on the presence/content of a text file. The registration stub will check for the presence or content of a file and then will proceed appropriatly.

    2. Dynamically generate the name of the installed file. like
    !(("Register via GPRS"), ("Register via SMS"))
    IF ( option1==1)
    "register.exe"-"C:\private\10000005\import\registersms.exe", FR
    ELSE
    "register.exe"-"C:\private\10000005\import\registergprs.exe", FR
    ENDIF
    since the executable name will always be available to the exe via arg[0] i think i will be able to pass parameters to the same registration stub.

    both options seem messy to me. Can you please any suggest any other solution.

    Thanks,

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: PKG File: executing an exe with command line arguments

    Since you are starting an executable, you can consider asking the user in your code.

  5. #5
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    Re: PKG File: executing an exe with command line arguments

    ya that would have been the most sensible approach but i wanted to keep the registration stubs clean of any UI. They are executed only one time and then removed by the main application when it first boots up.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: PKG File: executing an exe with command line arguments

    Quote Originally Posted by vaibhavjain View Post
    They are executed only one time and then removed by the main application when it first boots up.
    Since you are using 3rd edition, I would have some doubts about the probability of this removal.

  7. #7
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    Re: PKG File: executing an exe with command line arguments

    Quote Originally Posted by wizard_hu_ View Post
    Since you are using 3rd edition, I would have some doubts about the probability of this removal.
    prefect point.(how could i miss the data caging issue).... however as far as my understanding of data caging is concerned the application has access to its own directories ( readonly for /resouce and readwrite for /private/<sid>/) and if that exe resides in the same directory (/private/<sid>) then i can easily get it deleted . Please correct me if i am wrong.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: PKG File: executing an exe with command line arguments

    Remember that on 3rd edition any file containing binary executable code resides in \sys\bin. The directory you cannot even read in a general situation. And this is the only place where the OS looks for binaries.
    Ok, there are tricks (for JIT compilers, there is RChunk::CreateLocalCode, and you can put there anything you want), but their use is not typical in "everyday code".

  9. #9
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    Re: PKG File: executing an exe with command line arguments

    Thanks for that insight in to data caging . I wasnt aware of the /sys/bin issue. Now i can really see how datacaging provides real security.

    Anyways i am only left with two working options one that i add some gui to my registration stub or second that i use option 2 mentioned in my previous post. I think that former option will be much better in terms of simplicity and future extensibiliy.

    Thanks for the help.
    :-)

Similar Threads

  1. Contacts fields order??
    By timatima in forum Symbian
    Replies: 1
    Last Post: 2007-06-08, 13:51
  2. File server: Compilation error in carbide.c++
    By justteam in forum Symbian
    Replies: 6
    Last Post: 2007-01-03, 23:44
  3. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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