GetTempPath retrieves the path of the directory designated for temporary files.
Order to check for the existence of environment variables:
- TMP environment variable.
- TEMP environment variable.
- USERPROFILE environment variable.
- Windows directory.
String tempPath = System.IO.Path.GetTempPath();