The reason why this error appears is because the NX_ROOT\NX.ENV and/or the NX_ROOT\pdmconf\NX.ENV_NT.TPL files was edited manually and was not saved in the right encoding.
If the file is saved in "UTF-8", "Unicode" or "Unicode big endian" encoding, the Visual C++ error will appear.
The supported and correct encoding format for the NX.ENV file is "ANSI".
Revert the environment back to the pre CA SDM upgrade and ensure that both the NX_ROOT\NX.ENV and NX_ROOT\pdmconf\NX.ENV_NT.TPL files have been saved with the proper encoding.
In addition, it was also noted that the nx_compare.pl tool, which creates the updated version of NX.env during upgrade, it is not handling couple of items properly:
1) Embedded Spaces were removed in directory names with embedded spaces in the names, example: Program Files as ProgramFiles
2) Added 2 unicode characters - and the ‘ in below two lines (those characters can be removed and a correct - or ' can be put in place instead)
# In general batch max size should be in range 2-12MB (as per EBR_MAX_INDEX_BATCH_SIZE * average document size)
# Analyst Notification - End User's time in the Queue has expired
3) Removed one additional embedded space in the line below:
It should be:
@NX_UFAM_ATTRIBUTES=acquire_date alarm_id …………………..
1) It is suggested to use a comparison tool, example: WinMerge, to identify differences like the ones above
2) Fix the wrong/mishandled characters in the NX.env file as mentioned above
3) Save the file
Then, re-attempt the CA SDM upgrade process.