Our current windows installer tends to warn most users about a too long path. This is done in the following function of our template installer:
https://phabricator.mitk.org/source/mitk/browse/master/CMake/NSIS.template.in;7da0d0540a2c726b79c58e1e011f79a7f74f1ba0$216-302
It might be possible to reduce the occurence by using a different technique to add to the path instead of replacing it.
See http://nsis.sourceforge.net/Path_Manipulation and the RegQueryValueEx function which is mentioned there.