Permissions problem during VSTO addin loading

R

Rajesh K

Hi,
My addin [based on OutlookRibbonXVB_VSTO sample] was not getting loaded on
a non-devlopment machine [Vista + O2k7] . When I set env variable
VSTO_SUPPRESSDISPLAYALERTS to 0, I get a log which indicates my permissions
are somehow wrong. This is also true with UAC turned off.
Maybe everyone else know how to get around this problem but not me :(

Hope someone can help ... I was under the impression that addins are
implicitly trusted.
Thanks
Rajesh K

Could not load file or assembly 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant permission to execute. (Exception from HRESULT: 0x80131418)


************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly
'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. Failed to grant permission
to execute. (Exception from HRESULT: 0x80131418)
File name: 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Execution
permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline(Exception e, String basePath, String filePath)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadStartupAssembly(EntryPoint
entryPoint, Dependency dependency, Dictionary`2 assembliesHash)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper(IHostServiceProvider serviceProvider)




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
 
K

Ken Slovak - [MVP - Outlook]

Addins are implicitly trusted once they're running. Getting a managed code
VSTO addin to actually load requires that when you deploy the addin that you
set up security using CASPOL, a SetSecurity project or even manually using
the Framework admin utility. The strongly named assembly must have full
trust granted to it.

There are walkthroughs for each version of VSTO that describe the
requirements and provide a SetSecurity project along with a set of custom
actions that you add to that project. Find the walkthrough for your VSTO
version and follow it exactly and you'll be able deploy your addin.




Rajesh K said:
Hi,
My addin [based on OutlookRibbonXVB_VSTO sample] was not getting loaded
on
a non-devlopment machine [Vista + O2k7] . When I set env variable
VSTO_SUPPRESSDISPLAYALERTS to 0, I get a log which indicates my
permissions
are somehow wrong. This is also true with UAC turned off.
Maybe everyone else know how to get around this problem but not me :(

Hope someone can help ... I was under the impression that addins are
implicitly trusted.
Thanks
Rajesh K

Could not load file or assembly 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed
to
grant permission to execute. (Exception from HRESULT: 0x80131418)


************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly
'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. Failed to grant
permission
to execute. (Exception from HRESULT: 0x80131418)
File name: 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' ---> System.Security.Policy.PolicyException:
Execution
permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline(Exception
e, String basePath, String filePath)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadStartupAssembly(EntryPoint
entryPoint, Dependency dependency, Dictionary`2 assembliesHash)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider
serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper(IHostServiceProvider
serviceProvider)




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
 
R

Rajesh K

Hi Ken,

I am using VSTO SE, and Outlook 2007. The only reference I see is for VSTO
[not SE] with O2K3 at:
http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx

Am I making some mistakes there? Part 2 has a code walkthorough for O2K3.
Thanks
Rajesh

Ken Slovak - said:
Addins are implicitly trusted once they're running. Getting a managed code
VSTO addin to actually load requires that when you deploy the addin that you
set up security using CASPOL, a SetSecurity project or even manually using
the Framework admin utility. The strongly named assembly must have full
trust granted to it.

There are walkthroughs for each version of VSTO that describe the
requirements and provide a SetSecurity project along with a set of custom
actions that you add to that project. Find the walkthrough for your VSTO
version and follow it exactly and you'll be able deploy your addin.




Rajesh K said:
Hi,
My addin [based on OutlookRibbonXVB_VSTO sample] was not getting loaded
on
a non-devlopment machine [Vista + O2k7] . When I set env variable
VSTO_SUPPRESSDISPLAYALERTS to 0, I get a log which indicates my
permissions
are somehow wrong. This is also true with UAC turned off.
Maybe everyone else know how to get around this problem but not me :(

Hope someone can help ... I was under the impression that addins are
implicitly trusted.
Thanks
Rajesh K
 
R

Rajesh K

I now get another set of permission errors listed at the bottom. Also, in
the pre-installed dependency list, I did not see VSTOSe runtime dependency.
Nor did I see any for Outlook/Office 2007 runtime libraries or any thing of
that nature. I only saw .net 2.0 dependency and I checked that. What am I
doing wrong here?

Could not load file or assembly 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant permission to execute. (Exception from HRESULT: 0x80131418)


************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly
'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. Failed to grant permission
to execute. (Exception from HRESULT: 0x80131418)
File name: 'TrustToneRibbonXVB_VSTO, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Execution
permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline(Exception e, String basePath, String filePath)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadStartupAssembly(EntryPoint
entryPoint, Dependency dependency, Dictionary`2 assembliesHash)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper(IHostServiceProvider serviceProvider)




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
 
K

Ken Slovak - [MVP - Outlook]

Did you study that walkthrough I pointed you to? It has information about
pre-requisites, requirements and how to set up a bootstrapper for them. All
the problems you're having are covered in the walkthrough.
 
R

Rajesh K

Hi Ken,
Got it working but facing bootstrapping problems now. I had, at some
point, corrupted the project and I had all sorts of issues. I redid the
whole thing and followed pretty much everything exactly as you suggested and
it works [except for bootsrapping]. Thank you

I still have problems with bootstrapping. Here is what I have done:
1. Checked .NET 2.0, 2007 MSO Interop Assemblies, Vsto se runtime.

I did not check 2003 MSO Interop assemblies since my addin works with
2007 OL only.

2. Ran a clean build which gave me setup.exe, MyAddin.msi, and
Office2007PIA/o2007pia.msi.

Small Problem: Seems like I have to deploy 2007 MSO Interop assemblies
even when I mark them to be downloadable from component vendor's site.

Big problem: When I run setup on target machine, I am asked if I want to
install the MSO2007 Interop assemblies. It then proceeds but gives an error.
I have pasted the log contents at the end. But the last lines are:
C:\Users\ktest22\Desktop\TrustToneRibbonXVB_VSTOSetup.msi' and command line ''
MsiInstallProduct returned '1638'
Error:
Status of package '2007 Microsoft Office Primary Interop Assemblies' after
install is 'InstallUnknown'

Any idea what is going on ? Hope you can help ...

-- Rajesh
C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\install.log:

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 6.0.0 {version}
Running checks for package '.NET Framework 2.0', phase BuildList
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\dotnetfx\dotnetchk.exe"
Process exited with code 1
Setting value '1 {int}' for property 'DotNetInstalled'
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet
Explorer'
Read string value '7.0.6000.16386'
Setting value '7.0.6000.16386 {string}' for property 'IEVersion'
The following properties have been set for package '.NET Framework 2.0':
Property: [DotNetInstalled] = 1 {int}
Property: [IEVersion] = 7.0.6000.16386 {string}
Running checks for command 'dotnetfx\instmsia.exe'
Result of running operator 'ValueExists' on property 'VersionNT': true
Result of checks for command 'dotnetfx\instmsia.exe' is 'Bypass'
Running checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'ValueExists' on property 'Version9x': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.0.3': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property
'VersionMsi' and value '3.0': true
Result of checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
is 'Bypass'
Running checks for command 'dotnetfx\dotnetfx.exe'
Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled'
and value '0': true
Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Bypass'
'.NET Framework 2.0' RunCheck result: No Install Needed
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase BuildList
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe" {0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property 'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result: Install
Needed
Running checks for package 'Microsoft Visual Studio 2005 Tools for Office
Second Edition runtime', phase BuildList
Reading value 'Update' of registry key 'HKLM\Software\Microsoft\vsto runtime
Setup\v2.0.50727'
Read integer value 1
Setting value '1 {int}' for property 'VSTOVersion'
The following properties have been set for package 'Microsoft Visual Studio
2005 Tools for Office Second Edition runtime':
Property: [VSTOVersion] = 1 {int}
Running checks for command 'VSTOSERuntime\VSTOR.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VSTOVersion' and value '1': true
Result of checks for command 'VSTOSERuntime\VSTOR.exe' is 'Bypass'
'Microsoft Visual Studio 2005 Tools for Office Second Edition runtime'
RunCheck result: No Install Needed
Installation of components '2007 Microsoft Office Primary Interop
Assemblies' was accepted.
Copying files to temporary directory
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\"
Copying from 'C:\Users\ktest22\Desktop\Office2007PIA\o2007pia.msi' to
'C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi'
File
'C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe' already copied. Skipping file copy.
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase BeforePackage
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe" {0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property 'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result: Install
Needed
Verifying file integrity of
C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi
WinVerifyTrust returned 0
File trusted
Installing using command line '"C:\Windows\system32\msiexec.exe" -I
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi"
-q '
Process exited with code 0
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase AfterPackage
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe" {0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property 'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result: Unknown
Launching Application.
Using MsiInstallProduct with package path
'C:\Users\ktest22\Desktop\TrustToneRibbonXVB_VSTOSetup.msi' and command line
''
MsiInstallProduct returned '1638'
Error:
Status of package '2007 Microsoft Office Primary Interop Assemblies' after
install is 'InstallUnknown'
 
K

Ken Slovak - [MVP - Outlook]

First, was the installation done with admin permissions? That's required for
installation of either the PIA's or the Framework, as mentioned in the
deployment article. Second, you only do need to deploy the PIA's if Office
was installed before the Framework was installed on that machine. If the
Framework is already installed the PIA's will automatically be installed.

If you do have a situation where Office was installed before the Framework
you will also need to deploy or install KB908002.

The article referenced in part 1 of the walkthrough at
http://msdn2.microsoft.com/en-us/library/2ac08ee2(VS.80).aspx gives
information about how to prepare the target computer for the various
requirements.

I don't know anything other than the information from those walkthroughs and
referenced articles. Using that information I've successfully built
deployments for various VSTO addins. I suggest that you go back to the
articles and make sure you follow all the details. This isn't something
where you can skip around and skim the articles, as mentioned you have to
follow their steps exactly if you want deployments to work.




Rajesh K said:
Hi Ken,
Got it working but facing bootstrapping problems now. I had, at some
point, corrupted the project and I had all sorts of issues. I redid the
whole thing and followed pretty much everything exactly as you suggested
and
it works [except for bootsrapping]. Thank you

I still have problems with bootstrapping. Here is what I have done:
1. Checked .NET 2.0, 2007 MSO Interop Assemblies, Vsto se runtime.

I did not check 2003 MSO Interop assemblies since my addin works with
2007 OL only.

2. Ran a clean build which gave me setup.exe, MyAddin.msi, and
Office2007PIA/o2007pia.msi.

Small Problem: Seems like I have to deploy 2007 MSO Interop assemblies
even when I mark them to be downloadable from component vendor's site.

Big problem: When I run setup on target machine, I am asked if I want to
install the MSO2007 Interop assemblies. It then proceeds but gives an
error.
I have pasted the log contents at the end. But the last lines are:
C:\Users\ktest22\Desktop\TrustToneRibbonXVB_VSTOSetup.msi' and command
line ''
MsiInstallProduct returned '1638'
Error:
Status of package '2007 Microsoft Office Primary Interop Assemblies' after
install is 'InstallUnknown'

Any idea what is going on ? Hope you can help ...

-- Rajesh
C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\install.log:

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 6.0.0 {version}
Running checks for package '.NET Framework 2.0', phase BuildList
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\dotnetfx\dotnetchk.exe"
Process exited with code 1
Setting value '1 {int}' for property 'DotNetInstalled'
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet
Explorer'
Read string value '7.0.6000.16386'
Setting value '7.0.6000.16386 {string}' for property 'IEVersion'
The following properties have been set for package '.NET Framework 2.0':
Property: [DotNetInstalled] = 1 {int}
Property: [IEVersion] = 7.0.6000.16386 {string}
Running checks for command 'dotnetfx\instmsia.exe'
Result of running operator 'ValueExists' on property 'VersionNT': true
Result of checks for command 'dotnetfx\instmsia.exe' is 'Bypass'
Running checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'ValueExists' on property 'Version9x': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.0.3': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property
'VersionMsi' and value '3.0': true
Result of checks for command
'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
is 'Bypass'
Running checks for command 'dotnetfx\dotnetfx.exe'
Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled'
and value '0': true
Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Bypass'
'.NET Framework 2.0' RunCheck result: No Install Needed
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase BuildList
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe"
{0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property
'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and
value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result:
Install
Needed
Running checks for package 'Microsoft Visual Studio 2005 Tools for Office
Second Edition runtime', phase BuildList
Reading value 'Update' of registry key 'HKLM\Software\Microsoft\vsto
runtime
Setup\v2.0.50727'
Read integer value 1
Setting value '1 {int}' for property 'VSTOVersion'
The following properties have been set for package 'Microsoft Visual
Studio
2005 Tools for Office Second Edition runtime':
Property: [VSTOVersion] = 1 {int}
Running checks for command 'VSTOSERuntime\VSTOR.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VSTOVersion' and value '1': true
Result of checks for command 'VSTOSERuntime\VSTOR.exe' is 'Bypass'
'Microsoft Visual Studio 2005 Tools for Office Second Edition runtime'
RunCheck result: No Install Needed
Installation of components '2007 Microsoft Office Primary Interop
Assemblies' was accepted.
Copying files to temporary directory
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\"
Copying from 'C:\Users\ktest22\Desktop\Office2007PIA\o2007pia.msi' to
'C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi'
File
'C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe'
already copied. Skipping file copy.
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase BeforePackage
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe"
{0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property
'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and
value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result:
Install
Needed
Verifying file integrity of
C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi
WinVerifyTrust returned 0
File trusted
Installing using command line '"C:\Windows\system32\msiexec.exe" -I
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\o2007pia.msi"
-q '
Process exited with code 0
Running checks for package '2007 Microsoft Office Primary Interop
Assemblies', phase AfterPackage
Running external check with command line
"C:\Users\ktest22\AppData\Local\Temp\VSD5172.tmp\Office2007PIA\ComponentCheck.exe"
{0638C49D-BB8B-4CD1-B191-050E8F325736}
Process exited with code 0
Setting value '0 {int}' for property 'Office2007Exists'
The following properties have been set for package '2007 Microsoft Office
Primary Interop Assemblies':
Property: [Office2007Exists] = 0 {int}
Running checks for command 'Office2007PIA\o2007pia.msi'
Result of running operator 'ValueNotEqualTo' on property
'Office2007Exists'
and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and
value
'false': false
Result of checks for command 'Office2007PIA\o2007pia.msi' is 'Install'
'2007 Microsoft Office Primary Interop Assemblies' RunCheck result:
Unknown
Launching Application.
Using MsiInstallProduct with package path
'C:\Users\ktest22\Desktop\TrustToneRibbonXVB_VSTOSetup.msi' and command
line
''
MsiInstallProduct returned '1638'
Error:
Status of package '2007 Microsoft Office Primary Interop Assemblies' after
install is 'InstallUnknown'
 
R

Rajesh K

It seems that if the items in the bootstrap list are already installed then
the install breaks. At least that is what I initially concluded. I may be
wrong; there may be something else happening. And my conclusion is probably
wrong since setup.exe should detect the deps and do the "right-thing" by not
reinstalling the assemblies.

I am deploying this on Vista + o2k7. Is that an additional issue?

I do have admin permission etc. Ultimately this setup needs to be installed
inside another legacy installer written in InstallShield Pro 8.

I tried "setup /quiet ", and "setup /progress" but there is nothing quiet
about the installs.

And I have printed the sheets and pinned them to my wall and I check off
things on a spreadsheet to ensure I am not missing a step :)

Rajesh
 
K

Ken Slovak - [MVP - Outlook]

Vista always adds complications, especially with VSTO addins. Those only
work when registered in HKCU and if you're installing with an admin logon
you end up registered in the wrong HCKU (the admin logon's). The solution is
to register in HKLM, but VSTO addins don't work when registered in HKLM.

Since this is getting deep into VSTO installations issues on Vista why not
post on the MSDN VSTO forum? Members of the VSTO team answer questions there
so you're more likely to get a definitive answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top