By Garth Jones
Similar to other ConfigMgr 2012 administrators, anytime I run into an issue I review the log files. Recently, I launched CMTrace on one of my servers and I kept getting this error message, “Failed to create temporary file.” I find it really difficult to review log files using Notepad (sorry @Wally_Mead) so I had to find a solution to this CMTrace problem fast.
Here’s some background information:
While testing a new application I decided to clear out the temp folder on the server that I was working on. The %temp% environment variable pointed to C:\Users\administrator.AD\AppData\Local\Temp. However, since I was remote controlled (RDP) into the server the RDP session’s %temp% was actually C:\Users\administrator.AD\AppData\Local\Temp\2. The %temp% environment variable pointed to a nonexistent folder, so this explains why I kept getting this error with CMTrace. The folder didn’t exist!
What I did:
The solution to this problem was to simply recreate the folder. Once I did this everything worked great. By the way, I have since discovered that I also could have logged off and logged on again. This also would have recreated the folder for me.