PlanetWilson

I have built an installer for my VSTO addin which works fine under
Outlook 2003 and 2007. I have code whcih sets the CAS for my add-in so
it will run. The problem is that my installer won't run unless the user
running it has admin privileges on the box. It displays an error saying
you have to be an admin

It installs on a per user basis as you can't get the VSTO plugins to
install for all users under 2007. So how do I create an install which
will work for non-admin users




Re: Visual Studio Tools for Office How to get addin install to work for non-admin users?

Darryn Lavery -- MSFT

Hi,

How does your security code work. One issue may be that if you are setting policy at the machine level then you need admin rights. If you are a non-admin you can only set at the user level. With the user policy level you can only not add policy for URLs on a web-based or UNC location.

You may want to look at this deployment article:

http://go.microsoft.com/fwlink/ LinkID=57779

It is written for VSTO2005 and we are planning a release for 2005SE soon. However, the SetSecurity custom action is applicable to both VSTO 2005 and VSTO 2005SE.

Regards,

Darryn





Re: Visual Studio Tools for Office How to get addin install to work for non-admin users?

PlanetWilson

Hello Darryn,

Our security is set using the SetSecurity custom action project which you linked to. I will try and change it to see if we can set the security for the current user only and see if that works.

Thanks,

Mark






Re: Visual Studio Tools for Office How to get addin install to work for non-admin users?

PlanetWilson

I hadn't really looked too closely at that code before but thhe AllUsers flag from the installer gets passed all the way throuogh and if set to false the security is set on a per user basis, so it is already doing this.

I have noticed that I get a different message on another machine. The first machine gave us an error about requiring admin privs. On another machine the install starts but falls over trying to register a component. Both times the user is a non-admin on the box.

"Could not register type library for file ... Microsoft.VisualStudio.Tools.Applications.Runtime.tlb. Contact your support personnel"

Thanks






Re: Visual Studio Tools for Office How to get addin install to work for non-admin users?

Darryn Lavery -- MSFT

Hi Mark,

There are two parts to the setup. Setup.exe is responsible for installing the pre-requisites (.NET 2.0, VSTO runtime, Language pack) and then runs the MSI. The MSI is responsible for installing the solution. This component is the one that sets CASPOL, sets the registry key for the add-in.

When exactly in the install process does the message occur The Microsoft.VisualStudio.Tools.Applications.Runtime.tlb suggests setup.exe. Note that you do need to be an administrator for the pre-reqs.

Thanks and regards,

Darryn Lavery [MSFT]





Re: Visual Studio Tools for Office How to get addin install to work for non-admin users?

Darryn Lavery -- MSFT

Hi Mark,

I am closing this thread due inactivity. If this is still an issue, please open a new thread.

Thanks and regards,

Darryn Lavery [MSFT]