What do you mean it 'copies'? Physically copies? Or the current directory within the program has been set to \system32? If the latter, and you are using GetCurrentDirectory within your code, I would suggess that you don't rely on GetCurrentDirectory; instead use GetModuleFileName to locate the full path of your executable.