Best way to Lock a macro to specific solidworks serial number(s)

Does anyone do this? I used to do it in AutoCad. My boss has asked me to add this to a few proprietary macros we use(paid a lot of money for).  Is it as simple as get serial then an if/then statement to continue or close?

SolidworksApi macros