Qt DLL conflict caused by PATH variable
Created originally on Bitbucket by jrade
The TortoiseHg msi installer for Windows adds the path to the TortoiseHg installation directory the PATH environment variable. The installation directory contains the DLL's QtCore4.dll, QtGui4.dll etc. Thus any software on the machine that uses Qt risks loading the Qt dlls that come with TortoiseHg, instead of the ones it is supposed to load.
It just happened to me, and it caused a problem that was tricky to debug; see http://stackoverflow.com/questions/8281639/qt-fails-to-find-codec-plugin/8281841#8281841
Is it necessary for the msi installer to add the installation directory path to the PATH variable? (I fixed the problem on my machine by removing the path from the PATH variable, and everything seems to work fine.)