Managing product versions in managed workspace

I am trying to control which application and versions can be used on files. For example, we have several data sources that are ORD 10.10 and a few that are 10.12, so we have a mix of installations. I want to be able to test for the application and then version to either allow the opening of ORD files from ProjectWise.

My code looks like this:

%if $(_USTN_PRODUCT_FULLMARKETINGNAME) = "OpenRoads Designer CE - 2021 Release 1"
%if $(_USTN_PRODUCT_VERSION_MAJOR) != "10"
%error "Unsupported OpenRoads Designer version detected."
%endif
%else if $(_USTN_PRODUCT_FULLMARKETINGNAME) = "OpenRoads Designer CE - 2021 Release 2"
%if $(_USTN_PRODUCT_VERSION_MAJOR) != "10"
%error "Unsupported OpenRoads Designer version detected."
%endif
%else if $(_USTN_PRODUCT_FULLMARKETINGNAME) = "OpenRoads Designer CE - 2022 Release 3"
%if $(_USTN_PRODUCT_VERSION_MAJOR) != "12"
%error "Unsupported OpenRoads Designer version detected."
%endif
%else if $(_USTN_PRODUCT_FULLMARKETINGNAME) = "MicroStation CONNECT Edition"
%if $(_USTN_PRODUCT_VERSION_MAJOR) != "16"
%error "Unsupported MicroStation version detected."
%endif
%else if $(_USTN_PRODUCT_FULLMARKETINGNAME) != "MicroStation 2023"
%error "No valid modelling engine found."
%endif

This results in an illegal operator error on launch. Can someone please fill me in as to why this fails, and how I can change it to work as I need?

NOTE: This is testing, and depending on which data source this is implemented on, I'll remove the unnecessary ORD test.

Thank you!

Scott