Windows 7 Office addin fails

Add-in Express™ Support Service
That's what is more important than anything else

Windows 7 Office addin fails
 
Ian Scrivens




Posts: 19
Joined: 2010-01-22
I have an Office addin that has been installing fine on all machines, but we have just come across our first machine with Windows 7 and the installation is failing.

The addin has RegisterForAllUsers=True, so on all other machines we've had users in the local Administrators group, and the installation has worked fine.

On the Windows 7 machines this does not work, it says that the user does not have sufficient right to install and should log on as an Aministrator (even though they are in the admin group).

However, if I remove the user from the local admin group, and instead right click on the setup.exe and choosde 'Run as Administrator' then the installation works OK.

So, what is the difference between doing 'Run as Administrator' and being in the local Admin group?

Thanks in advance,

Ian
Posted 30 Mar, 2010 12:09:59 Top
Andrei Smolin


Add-in Express team


Posts: 16970
Joined: 2006-05-11
Hi Ian,

On Vista, Windows 7 and Windows 2008 server with default UAC settings, an administrator works as a standard user. When performing a task requiring administrative permissions, the UAC shows an appropriate dialog and (if everything is okay) the permissions are elevated. "Run as Administrator" is a way to elevate your permissions.

Note that if UAC is turned off, you can regard these Windows versions as Windows XP with an important difference: a per-user add-in registered by an administrator will not work because Windows will look for it in HKLM, and not in HKCU (as it was on Windows XP).

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Mar, 2010 08:34:23 Top
Ian Scrivens




Posts: 19
Joined: 2010-01-22
In this instance, we did not get any UAC dialog boxes appear to say that administrator permissions were required, hence the install failed. There was no prompt to enable us to elevate permissions, hence we had to use 'Run as Administrator'.

This is fine except the 'Run as Administrator' option is not available when a user is in the local Administrartors group, so it is a bit of a pain to have to remove them from this group and then add them back in after installing the add-in.

Any ideas on what we can do to make this a little easier?
Posted 07 Apr, 2010 10:29:45 Top
Andrei Smolin


Add-in Express team


Posts: 16970
Joined: 2006-05-11
Hi Ian,

If you created your setup project in VS 2008, then open the setup project file in notepad.exe and search for "RequiresElevation". If it is False, then change it to true, rebuild the setup project and run setup.exe without "as administrator".

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Apr, 2010 12:19:18 Top