|                                 Jordan Blaydes                				   
 
 
 Posts: 37
 Joined: 2009-02-08
 
 | 
                | Hi, I'm sorry if this has been asked before. 
 My goal is to create a COM Add-in that shows up in Excel for all users on a machine.
 
 1. My AddInModule property InstallAllUsers = True
 
 2. I right-clicked on AddIn and created a WIX installer project
 
 The XML contains the following relevant tags:
 
 
 
   <Package 
      InstallerVersion="200" 
      Compressed="yes" 
      InstallScope="perMachine" 
      Description="I'm an Add-in"
      Manufacturer="My Company"
      Languages="1033"
      SummaryCodepage="1252" 
      InstallPrivileges="elevated"
      />
 
 The adxregistrator_exe custom actions contain the /privileges=admin for RegisterApp
 
 
 
    <CustomAction Id="RegisterApp" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/install="[INSTALLFOLDER]$(var.MyTerminalAddIn.TargetFileName)" /privileges=admin /returnExitCode=false' Impersonate="yes" />
 
 The add-in is installing to Program Files directory
 
 When I install the add-in on windows 8.1, it does not work. The log file shows the following error message
 
 Exception Source:      AddinExpress.MSO.2005
 Exception Type:        System.ComponentModel.Win32Exception
 Exception Message:     Access is denied
 Exception Target Site: CreateSubKey
 
 I understand this error message but I am not sure how to fix it.
 
 I receive a UAC prompt when running the MSI, yet the log says I am not elevated
 
 Installation directory: C:\Windows\Installer\
 Registrator version: 7.3.4061.0
 Operating System: Microsoft Professional (build 9200), 64-bit
 Process Owner: Administrator
 Command Line: "C:\Windows\Installer\MSIDF7.tmp" /install="C:\Program Files (x86)\Uninstallable\MyTerminalAddIn.dll" /privileges=admin /returnExitCode=false
 Run 'As Administrator': No
 Process Elevated: No
 Integrity Level: Medium
 UAC (User Account Control): On
 
 The user running the MSI is privileged as an administrator. The user account is not the account "Administrator".
 
 The user account "Administrator" is disabled on most operating systems by default. I have found a curious workaround.
 If I enable the account name "Administrator" and then right-click the MSI and select "Run as" then type in the "Administrator" credentials, I can successfully install the add-in for all users and the registry access to HKLM is allowed.
 
 However, I do not want to do this. Enabling the "Administrator" account for my customers is undesirable. I would expect that an MSI could be run by an administrator privileged user, not the "Administrator" account, and gain access to the registry if the MSI requests elevation correctly.
 
 Am I missing a WIX XML setting that elevates the process? How do you create an add-in that Registers for all users and can be run by an administrator privileged account?
 | 
 | 
  
        |                                 Jordan Blaydes                				   
 
 
 Posts: 37
 Joined: 2009-02-08
 
 | 
                | I found this great post by Andrei. Sometimes you just need google-fu. 
 https://www.add-in-express.com/forum/read.php?FID=5&TID=12747&MID=64974#message64974
 
 I changed the custom action from impersonate=yes to impersonate=no and I was able to run the MSI, get access to HKLM, and install add-in for all users without enabling local administrator account.
 
 I did see that another workaround is to publish a setup.exe. I don't really have any prerequisites, other than .NET framework, so I wasn't too interested in publishing a setup.exe that essentially did nothing but elevate, not even sure if that's possible?
 
 Thanks,
 Jordan
 | 
 | 
  
        |                                 Andrei Smolin                				   
 Add-in Express team
 
 
 Posts: 19177
 Joined: 2006-05-11
 
 | 
                | Hello Jordan, 
 I agree, google-fu helps really often. ))
 
 I wouldn't make something better if it already works. What do you think?
 
 
 Andrei Smolin
 Add-in Express Team Leader
 | 
 |