GetTempPath/GetTempPath2 are documented as "The maximum possible return value is MAX_PATH+1 (261)" so your machine setup is broken if you hit that. A broken cmd.exe is a bit of a deal breaker. I would almost be more in favor of aborting with an error in makensis when %TEMP% and %TMP% are too long. Why are you hitting this issue? Can't you just use symlinks/junctions/subst to shorten the file root path?
Fix function order for bug #1333
Thank you Jason.
makensis crashes with std::bad_alloc on macOS (iconv "wchar_t" encoding mismatch)
Use UTF-32 encoding for native 4 byte wchar_t on POSIX (bug #1333)
You can install as non-admin without 3rd-party tools: Run cmd.exe set __COMPAT_LAYER=RunAsInvoker nsis-setup.exe /P /S /D=%localappdata%\Programs\NSIS but this will not successfully install shortcuts etc. There are two reasons we don't currently support a per-user install option: In "Administrator Protection" mode, we need to disable the user option because it would install to the hidden admin profile. I don't think it has been documented how you detect if your token is such an admin token. Uninstalling....
nsExec::ExecToLog crash using .exe with live outputs
Added 26H2