As the title, I found there is some MSI can do so, How?
That is depending on the type of installer you take. I just know that
WiX and NSiS can test for it (and I am pretty sure most of other
installer-tools can it, too).
As every installer has different settings and configurations, you have
to check the documentation there, or be more specific with your question
here in the newsgroup.
hth
Markus