Unable to start Photoshop CS6 - could not open a scratch file because the file is locked (Windows)
When I first installed Adobe Photoshop CS6 I was unable to run Photoshop or Bridge CS6. Photoshop would give me an error about "could not open a scratch file because the file is locked. If I ran either of these programs as an administrator they would run without issue, this led me to believe that there was a permission issue somewhere. After some digging I found out the both Bridge and Photoshop try to create a temp file (similiar to Photoshop Temp2777223910092) on the c:\ drive of the computer. In my case the user that I was logged in with did not have access to write to the root of the C:\ drive. Note that you run the program as the administrator and change the scratch disk location as that changes the preference for the administrator user and not the user that you are currently logged in as.
To get around this issue I first had to give the user that I was logged on with write permissions to the root of the C:\ drive. Next try and run Photoshop, you will get an error another error about the scratch disk and about and invalid or missing setting file. To correct this you need to have run Photoshop as an administrator, next you can go to Users\Admin\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings and copy Adobe Photoshop CS6 Prefs and/or Adobe Photoshop X64 CS6 Prefs to Users\<your logged in username>\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings.
Photoshop and bridge should now start up with no issues.
I hope that this can help others out there as this caused me a great deal of frustration when upgrading to CS6.
