How to determine the actual name of Program Files folder in mobile device registry ?

Posted on 2007-10-05
Last Modified: 2013-12-27
Hi, I am trying to determine the actual name of the Program Files folder on a mobile device running a Windows CE operating system. OK so much of the time it is going to be plain old 'Program Files' but this is not always going to be true. This question is not about how to do this (I have already coded for this using RAPI functions CeRegOpenKeyEx and CeRegQueryValueEx which seems to be fine and I am reading the value from the mobile device(s) from HKLM\Explorer\Shell Folders because that's all I've found) but ... is this the correct place to be reading this value from ?
  I have recently recoded a program to read this value before copying files to a sub folder of the mobile device's Program Files folder whereas previously I had hard coded \Program Files\(sub folder). Now I'm getting users with problems, so am I getting this value from the correct place in the mobile device registry ?


Question by:RetroRocker
    LVL 48

    Accepted Solution


    Author Comment

    Mikal613 : Thanks, that's pretty damn (please excuse exuberance) close. Since first posting I have done a lot more research on this and did reach a satisfactory conclusion but didn't take the time to post back. FWIW I use RAPI and Delphi 7, I have coded my own RAPI unit and call CeGetSpecialFolderPath from rapi.dll which is installed with ActiveSync. This function can use the CSIDL_PROGRAM_FILES constant to locate the 'Program Files' folder on the mobile device. This is 100% better than my previous hit and miss method !
    So although I did fix it for my own circumstances in the end, I genuinely appreciate the 'push' in the right direction. I have allocated the points and thanks again.
    LVL 48

    Expert Comment

    Thanks :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I recently asked a question ( about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now