0

I created a 'per machine' installer for an addin using the HKLM registry .
I installed the add-in on a 32 bit machine. The user that installed it has administrator permissions.

The registry entry is added under HKLM\SOFTWARE\Sparx Systems\EAAddins\MyAddin – for all users, but the addin is available only for the user how installed the “per machine” installer.

For all the rest of the users the program is unavailable.

Any ideas?

EDIT:

This is the package definition in the installer :

    <Package Description="#Description"
             Comments="Comments"
             InstallerVersion="200"
             Compressed="yes"/>

This is the registry definition:

<Component Id="AdminAddinsRegEntries" Guid="A8B685BF-E4B3-4D8B-A8B1-BAB845812233">
    <RegistryKey Root="HKLM" Key="Software\Sparx Systems\EAAddins\AdminAddins" Action="createAndRemoveOnUninstall">
       <RegistryValue Type="string" Value="AdminAddins.MyClass" />
    </RegistryKey>
</Component>
user3165438
  • 2,631
  • 7
  • 34
  • 54
  • Have you set the `InstallScope` of the `Package` element to `perMachine`? Also, please, include the relevant part(s) of installer into your question. – Yurii Jun 30 '14 at 08:25

1 Answers1

1

First of all, add the following attributes to your package element:

<Package InstallScope="perMachine" InstallPrivileges="elevated" ... />

perMachine
Set this value to declare that the package is a per-machine installation and requires elevated privileges to install. Sets the ALLUSERS property to 1.
elevated
Set this value to declare that the package requires elevated privileges to install. Source

Secondly, you can change the Root value of the RegistryKey to HKMU:

<RegistryKey Root="HKMU" ... />

So that registry entries will be placed either in the current user or local machine hive, depending on the type of installation. Or you, can keep it as is, if you will use it only for per machine installation.

Yurii
  • 4,811
  • 7
  • 32
  • 41
  • This is the reason : the classes is registered per user. Any ideas? – user3165438 Jul 06 '14 at 11:35
  • @user3165438, I don't quite get what you mean by that comment, but have you tried changing the `Root` attribute value to `HKMU` for the corresponding elements? – Yurii Jul 06 '14 at 11:48
  • Thanks. What do you mean with `HKMU`? Is it a common registry for all users? – user3165438 Jul 06 '14 at 11:50
  • Wix resolves `HKMU` to `HKLM` if you tick 'for all users' in the installer or to `HKCU` if you don't. – Yurii Jul 06 '14 at 11:54
  • But this is not the issue- since the dll is registeres successfully under HKLM. The problem is that the COM object - the class- is registred per user. It would be nice if you could take a look [here](http://stackoverflow.com/questions/24595470/wix-heat-for-per-machine-installer). – user3165438 Jul 06 '14 at 12:03
  • @user3165438 So is that accepted answer was the correct solution to the problrm..? – Dah Sra Jun 01 '15 at 06:33
  • @dahsra, Would you like me to help you with your problem? I would be glad to. – user3165438 Jun 01 '15 at 08:28
  • @user3165438 yes..!! http://stackoverflow.com/questions/30484217/installscope-permachine-in-wix-makes-no-difference/30550128#30550128 – Dah Sra Jun 01 '15 at 08:32