Francois Gouget fgouget@codeweavers.com writes:
mshtml.dll (and probably many others) use GetTempPath() during the self-registration process. But at that point the Windows environment variables, and in particular $TMP and $TEMP, have not been set yet, especially not in the currently running process. So when mshtml.dll calls GetTempPath(), that function returns the current directory, which obviously is no good if that directory is not writable (like '/' for instance). So this patch makes 'c:\windows\temp' the current directory, which we know will be writable (and the chdir() should have no other side effect in this script).
Actually GetTempPath is not supposed to use the current directory, I committed a fix.