Hi,
yes, you can use the prefix variables in SEPM but the result depends by the value of the variable in your systems.
If you have:
in system A
SQL installed on C:\Program Files\SQL
and %programfiles%=C:\Program Files
in system B
SQL installed on D:\Program Files\SQL
and %programfiles%=D:\Program Files
the exclusion %programfiles%\SQL works on both A and B.
If in system B you have:
SQL installed on D:\Program Files\SQL
but %programfiles%=C:\Program Files
the exclusion %programfiles%\SQL does not work on B because it reads C:\Program Files\SQL which is not correct for B.
To check on the fly the value of a variable on a given system, just enter it in Start > Run...