mjan635
mjan635

Reputation: 82

Outlook Addin MSI installer copies file in C:\

I've developed an Outlook addin that perfectly works with my outlook. I used our organizational code signing cert and used ClickOnce. Now I want to deploy it on a small group of machines (piloting). I followed this to create an MSI. The problem here is it copies all the files to C:\ with I double click on the setup.msi. But when I run it as an admin, it copies the files in the right location. Below is what I get from the msi log file.

MSI (s) (84:FC) [13:43:15:553]: Ignoring disallowed property TARGETDIR
MSI (s) (84:FC) [13:43:15:964]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:\'.

What am I doing wrong?

Upvotes: 0

Views: 126

Answers (2)

PhilDW
PhilDW

Reputation: 20790

With Visual Studio Setup Projects the main reason for this is that the installing user does not have admin privileges, as you seem to have discovered. These VS setup projects switch to a per-user non-elevated install when the user is not privileged. Among other things, this means that the install can't create files and folders in restricted locations (the Program Files folders and others) so the install gives you a separate isolated install in C:. The ALLUSERS value in a VS setup project is 2, and as the documentation here says:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa367559(v=vs.85).aspx

you can get a per-user non-elevated install if the user is not privileged. Windows won't let limited users write to restricted locations just because it's an install.

Upvotes: 0

Eugene Astafiev
Eugene Astafiev

Reputation: 49445

Looks like you need to change the target folder of your installer. Most probably you chose a folder which requires admin privileges for writing.

You may find the Deploy an Office solution by using Windows Installer article helpful.

Upvotes: 1

Related Questions