Neither is "right" or "wrong", or clearly better without more information from you.
Both require some access rights, though if the reg key is to current user then it could be more likely to be writable than the DLL's own folder. The temp folder should be writable though.
For multiple instances of the DLL running at once, a single, fixed registry key isn't safe, some will set it to 1 while others then set it back to 0. This is also a problem with a single, fixed file name.