I am trying to retrieve the environment variable to detect whether the system is 32 or 64 bit. But on 64 bit server the environment variable %processor_architecture%>
%processor_architecture%>
You can also get this from an environment variable, PROCESSOR_ARCHITEW6432. See this article for more info.
PROCESSOR_ARCHITEW6432