I'm getting the same thing - I start STO, log in and it starts to patch. Stops about a second into that and says: "Error 36: A files is locked that could not be open for writing.. Restart in 9 seconds" and keeps looping. Help. Thanks.
basicly a file or directory is lock so the game can not access it.
if you are using win7 or vista besure the launcher and gameclient exe are set to run as admin
sometime antivirus program will lock a file or directory when scanning so do a reboot of the pc and set the antivirus program to exclude the game directory.
also if using win7 or vista you will have problems if the game is installed in program files folder becuase of window's security feature for files in that directory.