Applications with flag /TSAWARE:NO crash in some environments. We noticed this on Windows servers 2016/2019.
*"The application was unable to start correctly (0xc0000135)."*
Seems that this is related to registry setting: HKLM\System\CurrentControlSet\Control\Terminal Server\TSAppCompat=1.
If I remove /TSAWARE:NO or set /TSAWARE:YES, application starts with no error. In that case GetWindowsDirectoryW returns wrong path.
I need to use /TSAWARE:NO.
What could cause this issue? Is there a way to fix this?