I'm trying to get the Program Files directory in a 64-bit OS. This code below returns the same answer Program Files (x86)
:
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86).ToString());
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles).ToString());
Any help?
On Windows editions that support x86 emulation, there are two directories for program files. The C:\Program Files directory is for programs in the native system bitness, and the the C:\Program Files (x86) directory is for programs that run under the x86-32 emulator.
While in the command prompt type "cd\", then enter. From there type "cd\program" then hit the tab button until you see "c:\program files (x86)", then hit enter. then hit the tab button.
Program Files is the name of the directory or the standard folder in Windows where third-party applications are installed by default. An application installed in this folder has its own subfolder where all of its program data go.
Go to File Explorer. Locate the file you've downloaded. Files you've downloaded are automatically saved in the Downloads folder. This folder is usually located on the drive where Windows is installed (for example, C:\users\your name\downloads).
You must run your program in 64 bit mode of course. Then this will print
C:\Program Files (x86)
C:\Program Files
Go to : Project > Your Project Properties... > Build > disable Prefer 32-bit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With