I\'m trying to copy a file to C:\\windows\\system32 by calling CopyFileA - debugging shows that indeed the string \"C:\\windows\\system32\\filename\" is sent to CopyFileA, b
Simply if you want to check the operating system then check it and access the folder system32 is like:
string os = Environment.GetEnvironmentVariable("WINDIR") + "\\SysWOW64";
if (Directory.Exists(os))
{
destinationDir = Path.Combine(Environment.ExpandEnvironmentVariables("%windir%"), "sysnative\\");
}
By this you can copy the file in system32 folder.
Enjoy: Ali Raza