C# Finding the Path to the Windows System32 Folder

Below is the sample code to find the path to the "System32" folder in C# programming language.


string systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System); 

If the operating system is installed by default, the result C:\WINDOWS\system32 will return.



You May Interest

Splitting a String By Desired Character in C#

C# Finding the Path to the Windows Fonts Folder

C# Example of Sum of Even Numbers from 1 to 100

C# Finding the Computer Name

C# Finding the Operating System Username