Revised patch. Uses SHGetFolderPath() to obtain the current Common AppData directory instead of reading directly from the registry which is unsupported.