Start program from SDcard

Discussion in 'Questions (Windows Mobile)' started by alea46, Mar 13, 2009.

  1. alea46

    alea46 Member Licensed User

  2. klaus

    klaus Expert Licensed User

    What program are you speaking of exe or sbp ?
    What do you mean with 'install' and 'run' my program on SD or CFcard ?
    Do you mean with the SetupBuilder ?

    On my Qtek9090, I have no problem to access either exe or sbp files from my SDcard, exe files with the files explorer. I have not yet tried to install an exe file on the SDcard with the SetupBuilder. If I remember well the SetupBuilder installs programs by default in the Program Files folder.

    For exe files, if you compile it with the optimized compiler you can simply copy it to the SDcard and run it from the files explorer.

    I was Googeling a bit and found following solution:
    - On the PC create a lnk file.
    then copy it to
    \Windows\Menu Démarrer\
    \Windows\Menu Démarrer\Programmes
    Then you will find the shortcut to your program either in the Start menu or in the Start menu programs.

    How to create a lnk file.
    Open NotePad and add in the first line:
    <number of characters>#<full program filename>
    <number of characters> = number of characters of the line including the 2 quotes.
    29#"\Storage Card\Draw\Draw.exe"

    This works on my Qtek9090.

    Best regards.
  3. alea46

    alea46 Member Licensed User

    SDcard problem

    HI, thank for that answers.

    How i create my program :
    *Compile for device without optimized option
    *Setupbuilder, with all the component in the load/save listbox (i.e .dll, exe,sbp...)
    * Install with setup program on PPC; I don't use the default directory.
    ==> shortcut is create in program list
    When i use it , Basic4ppc error "Error Loading program.\Carte SD\alea46 test_dalle\serial2.dll"
    With explorer, i'm see Serial2.dll (i don't understand why the program need serial2.dll against serialdevice.dll)

    Is someone cant try my program from one sd card?
  4. klaus

    klaus Expert Licensed User

    I tried your program on the desktop and it didn't run. I needed to chage the SerialDevice library to Serial2, I got a message that something is missing.
    My advice is: change SerialDevice to Serial2 and compile with optimized compiler then you can use the procedure I described in the previous post.
    The advantages with the optimized compiler are:
    - faster programs
    - smaller exe files
    - all dlls are embedded into the exe file making a unique stand alone file.

    Best regards.
    Last edited: Mar 13, 2009
  5. agraham

    agraham Expert Licensed User

    Have you got .NET Compact Framework 2.0 on your device? Serial2.dll needs .NET 2.0.

    You must have it added as a component even if you don't use it.
  6. alea46

    alea46 Member Licensed User

    Thank All

    Hi, and thank for all.

    Yes, i see all the problems from forgotten libraries.
    I don't understand why imagelibex is need, because i use imagelibexdevice.

    For optimzed compilation, i alway have message ' error compiling program error message CS0246: le type ou le nom d'espace de nom serial est introuvable.)

    For serial2 vs serialdevice, i make this change because the last year with my first version, i got bug on serial (see
    Last edited: Mar 13, 2009
  7. agraham

    agraham Expert Licensed User

    I assume that you mean ImageLibExdesktop added to the desktop components. It is needed because the optimised compiler uses the desktop library for referencing the objects methods, properties and events even if it is compiling for the device. You could actually add the device library as a desktop as well as a device component and it would compile for the device OK.

    There must be something wrong with your project, if you post it we could take a look.
  8. alea46

    alea46 Member Licensed User

    One who know is better than 10 who search

    Thank agraham, you're right.:sign0060:

    Serial2.dll need to be add in component list for device, even if you use another library as serialdevice.dll.
    In compile statut, serial2 is merge with executable, some other library too.

    So if i understand some llibrary need to be add in component list, because they are use in executable (by call in not optimized, by include in code in otimized)

    How can we know the list or how to determine these libraries

    For my program, see the tread
    Last edited: Mar 13, 2009
  9. agraham

    agraham Expert Licensed User

    I am afraid that I don't understand what you mean. Any library that you want to use must be added as a component.

    Nor do I understand why you are using both Serial2 and SerialDevice libraries. Surely you only need one or the other :confused:
  10. alea46

    alea46 Member Licensed User

    I use serialdevice.dll because it's the only library that allowed me to use my program.
    And to compile it in optimized mode, serial2 is required.
    So I'm put the two library....

    Perhaps i got installation problem with CF 2.

    I go to make news tests with simple code, for compilation.
  11. agraham

    agraham Expert Licensed User

    1) You shouldn't try to use the old serial libraries together with Serial2 in the same application. You must use one or the other.

    2) If your program works with the old serial library but not Serial2 then you won't be able to optimise compile it because the older libraries are not reliable under .NET 2.0 which is the version of .NET that optimised compiled apps require.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice