c# - Environment.SpecialFolder.ProgramFiles returns the wrong directory -


I am working on the C # project and I am using the following code

 < Code> string root path = environment Gatefolder Path (environment specialfolder.profile file);   

However, when I see the root on my set of C: \ Program Files (x86).

Why this happens because there is an environment. Special folder Programmable X86, which I thought would have returned above.

Thank you for any help

If your project is currently targeted The x86 platform will return both enum values ​​to the program files (x86) directory.

Change your project to X64 , and specialfolder. Program Files should instead return the program files directory.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -