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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -