none
System.Environment.SpecialFolder.CommonProgramFiles

    Question

  • I have a 32-bit application that I'm trying to get running on a 64-bit install.  The error I keep running into is a FileNotFound error.  My installation puts a config file at System.Environment.SpecialFolder.CommonProgramFiles -- and that seems to work just fine.  However, later when I try to access this file, it can't be found.

    Is there a different call I need to make to get a different "SpecialFolder"?  I know there is a Program Files and a Program Files (x86) folder now...but how can I differentiate between the two in code?  Or is the OS supposed to know the difference?

    Thanks in advance!
    Tuesday, December 11, 2007 2:48 PM

All replies

  • Even i have the same issue. When i install my .net project MSI, few files are copied into Program files and few are not copied or extracted from MSI. I get the same error of FileNotFound as file is not copied there.

     

    It is said that Vista takes care of moving the files into either Program Files(64 bit) or Program Files (x86)(32 bit). However my application is 32 bit. Accordingly all my files should be copied to Program Files (x86) and has to work smoothly.

     

    We cannot dictate customers to load 32bit version of OS. I am bound to make my application work on 64 bit OS.

     

    Let's see if we can get a solution.

     

    Thanks.

     

    Wednesday, December 12, 2007 5:49 AM