Is there some condition under which LogSet On would fail to open the file in the specified location? I have code that looks basically like the following:
StrCpy $INSTDIR "$myLogDir"
LogText "Hi there."
and on some occasions this will wind up writing the install.log file into the original $INSTDIR folder, not the one I specified! I've stared at the source code, but I can't see any reason why this would happen.
One possible clue is that when this happens, the installer is running with elevated permissions, using UAC::RunElevated. Again, though, I don't see why this should be a problem.