CSIDL_PROGRAM_FILES always returns x86


  1. Posts : 5
    Windows 7 64bit
       #1

    CSIDL_PROGRAM_FILES always returns x86


    I am not sure if this is the right forum to discuss this.
    I have a code that needs to search for an exe. By default the application saves in the program files folder and hence I use

    Code:
    SHGetFolderPath(NULL, 
                                 CSIDL_PROGRAM_FILES, 
                                 NULL, 
                                 0, 
                                 szPath
    to search for the folder. This is returning the Program Files(x86) all the time, even if the application is stored in Program files. I am using Win 7 64bit and the code is being compiled for x64. Does anybody know why this might be happening ? Also, what is the best method to search for an exe when its not launched thru code ?

    Thanks
      My Computer


  2. Posts : 4,772
    Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
       #2

    Hi, Welcome to SF,

    I'm not sure about this but see whether this helps CSIDL

    Hope ths helps,
    Captain
      My Computer


  3. Posts : 5
    Windows 7 64bit
    Thread Starter
       #3

    Yes, that is what i had referred. Can you please test and tell me if it is just me that are getting the wrong folder name ?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:38.
Find Us