GetTempPath returns C:\Users\sam\AppData\Local\Temp\
in my application A on Windows 10.
But it returns C:\Users\sam\AppData\Local\Temp\2\
in another application B (a dll hooked in another application prints value of GetTempPath) on same computer. I guess the application B change the temp path.
The boost filesystem behaves the same.
auto tempDirPath = boost::filesystem::temp_directory_path();
return tempDirPath.native();
How does this happen? How could I get exactly the same temp path C:\Users\sam\AppData\Local\Temp\
?