http://bugs.winehq.org/show_bug.cgi?id=5024
--- Comment #28 from Erich Hoover ehoover@mines.edu 2007-10-18 10:15:40 --- (In reply to comment #26)
i don't think my patch from comment #19 is correct.
Why is that? If you apply the patch before installing the game then it fixes the problem. From running tests with CreateFile it looks like there are only three possibilities for the appropriate permissions: {G_RW, G_R , FS_RW, FS_RW, ERROR_NONE}, {G_RW, G_W , FS_RW, FS_RW, ERROR_NONE}, {G_RW, G_RW, FS_RW, FS_RW, ERROR_NONE},
Since the place you changed actually doesn't do any writing I would say the top option is the most appropriate (GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE), the second option probably would not work because of other code, and the bottom option would be more permissions than necessary (this is the method implemented in your patch). The only other issue would be CREATE_ALWAYS vs. OPEN_ALWAYS, which MSDN indicates should be OPEN_ALWAYS since the profile file should be created if it is not found and opened if it is found.