tags:

views:

278

answers:

2

Hi

I have an Office 2007 add-in (developed using Visual Studio 2005 Tools for Office Second Edition) which has been packaged into an .msi file, using the Setup project in Visual Studio 2005

The problem is that when the users install the package themselves by using Next->Next->Finish then everything works normally, but when I try to install it using the domain administrator silently on all machines (In this case we have hundreds of users) then it doesn't work properly (although it installs normally) Following is the command used to install the .msi package silently

msiexec /fa "solution.msi" ALLUSERS=1 /qb!

This image shows how the system registry is populated at install time to connect our solution to Office2007

Could there be any previous versions of the solution that might be conflicting with our silent install ? or might there be another problem ?

Could there be any problems relating to CASPOL security which could be failing when I install this silently ?

+1  A: 

My guess (since I can't access your image) is that when you install as an administrator, your installed files are not setup with permission correctly for other "normal" users.

So you probably need to set read and/or write access to *\users on your files.

Magnus Johansson
+2  A: 

Several things to note:

First, the command line you gave is not for installing; if the app is already installed, it will re-install. The "/qb!" option makes the "Next" and "Finish" dialogs show up. And the "ALLUSERS=1" option tells it to put shortcuts in the All Users' Start Menu (but doesn't change how it installs Registry keys--more on that in a sec.) I would recommend something like this:

msiexec /i "solution.msi" ALLUSERS=1 /qn

Secondly, your snap of the Registry shows that the app requires HKEY_CURRENT_USER entries. These, as the name suggests, are separate for each user who logs onto the machine. (This explains why if users install it themselves it works.) If you install it as the Administrator account, than that account will have the Registry entries it needs--but not necessarily any other accounts that login. Your MSI has to be specially designed to push the HKCU entries for each new user who logs on.

For tips on how to design an MSI so that it puts the HKCU Registry entries in for you, see one of the following:

ewall
You were right, I fixed the problem by moving the registry settings to HKEY_LOCAL_MACHINE and adding a Count key at the addin source folder location (see http://www.box.net/shared/3mzzmam4i6).The following url's were a valuable resource while finding the solution to the problemhttp://msdn.microsoft.com/en-us/library/cc136646.aspx#AutoDeployVSTOse_InstallingtheAddinforAllUsershttp://blogs.msdn.com/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspxhttp://blogs.msdn.com/mshneer/archive/2007/09/05/deploying-your-vsto-add-in-to-all-users-part-ii.aspx
armannvg
Ah, yes. Good stuff. Thanks for sharing the links!
ewall