Through the registry I guess, checking specific registry records which identify if the dll is already registered.
Anyways, if it is already registered and you attempt to register it again would not harm you, and of course if you use the Library.nsh you don't have to worry of anything.