none
Setting environment variables to be used inside window ce target environment by application. RRS feed

  • Question

  • Hello All,

    How can I set environment variable at development time to be used inside window ce target environment that will eventually be used by application inside wince.

    Thanks,

    Monday, May 6, 2013 4:50 PM

Answers

  • Your question seems to be about setting/getting environment variables on your Windows CE device.  Windows CE does not support environment variables.  Instead, the registry can be used.  So from PB you can set values in the registry and the read them on the device from the registry.

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    • Marked as answer by Wince_User Tuesday, May 7, 2013 11:32 AM
    Tuesday, May 7, 2013 11:25 AM
    Moderator

All replies

  • Here is another method.

    Open <BSP>.bat file from WINCEROOT\platform\<BSP_name>

    add the environmental variable as 

    set MY_VARIABLE=

    Initialize it 1 or leave it otherwise if you want to initialize it to zero.

    In the sources.cmm file you can define it and can accessed in sources files

    CDEFINES=$(CDEFINES) -DMY_VARIABLE=1

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Tuesday, May 7, 2013 10:33 AM
  • Your question seems to be about setting/getting environment variables on your Windows CE device.  Windows CE does not support environment variables.  Instead, the registry can be used.  So from PB you can set values in the registry and the read them on the device from the registry.

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    • Marked as answer by Wince_User Tuesday, May 7, 2013 11:32 AM
    Tuesday, May 7, 2013 11:25 AM
    Moderator