I create a WIX installer for a dll.
There is a class element that register the class of the dll in the registry.
<Class Id="{1AF5E2B9-CC02-368F-A879-1DF3F538D71A}"
Context="InprocServer32"
Description="AdminAddins.MyClass"
ThreadingModel="both"
ForeignServer="mscoree.dll">
<ProgId Id="AdminAddins.MyClass" Description="AdminAddins.MyClass" />
</Class>
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\CLSID\{1AF5E2B9-CC02-368F-A879-1DF3F538D71A}
\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}"
Value="" Type="string" Action="write" />
However, it always registered under HKEY_CURRENT_USER
.
Is there a way to explicitly refer the class to be registered under HKEY_LOCAL_MACHINE
?
If you have not set the ALLUSERS property it defaults to per user, so the installed product will work only for the installing user. If it's a single-user machine then that's fine and if the app works then maybe you don't need to worry. A per user install creates COM registration just for that user, not everyone who might log on.
If you want the app to be available for all potential users who log on the system then force ALLUSERS to be 1 and the per machine registration will go in HKLM, assuming that the installing user has the privilege to create entries there.
http://msdn.microsoft.com/en-us/library/aa367559(v=vs.85).aspx