Help Nikolay!

Started by perry59, October 24, 2016, 09:07:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I've been using your template for quite a while and really love it!
most of the time, I'm using my addin on my development machine. When I went to install on another machine it installed just fine but did not show up in visio. I Went to the "trust center" and found this. (see pic)
is there something I need to change in the installer code?
Thanks
Perry
what, me worry?

Nikolay

Hi Perry,

The message means that addin is installed per-computer. So ro remove it using this dialog you need to start visio as administrator.

But most probably that's unrelated. If it runs on one computer but doesn't on another that probability means that something is missing on that another computer.. Are you using some third-party library or nuget package?

Need details! (Visio version for example)
Could you post the addin (pm/email)? That would be the easiest.


perry59

Should have mentioned, this is visio 2007.
Ok, so I ran visio under admin, I can then check the box without getting an error.
this did not help though, the addin is always "inactive". If I remove that entry and try to manually load the vsto file, it tells me its not a valid office addin.
I looked in the registry under HKEY_CURRENT_USER/MICROSOFT/VISIO/ADDINS and there is nothing there!
I also do not see anything in the template code that modifies the registry.
I assume it works on my development machine because visual studio registers the .dll (but does NOT install the vsto package)
I am not using any other third party extensions.
do you want the project files? (zipped up still over 30 megs)
Perry
what, me worry?

Nikolay

Yes, 30meg should be no problem.

For Visio 2007, in case you used VSTO, there is a bug - VSTO 4 runtime may not be asked to be installed (it's required for 2007), for later version it's not.

Please try installing VSTO runtime at the target system:
https://www.microsoft.com/en-us/download/details.aspx?id=48217

perry59

I uninstalled my addin, the applied the newer VSTO redist and re installed my addin.
No luck :(
the zip file is not so bad, just 13 megs, but I don't see a way to attach it to a PM or email!
what, me worry?

Nikolay


perry59

I saw this remark (circled in image) in a previous discussion.
Is this relevant here? I could not find the string "ENABLE=" anywhere in my project.
-Perry
what, me worry?

perry59

tried installing on a different machine. Same thing. Files get installed but the registry is not modified so the addin does not start and the stencils/templates do not show up in the GUI.
here is the WIX script, but it looks ok?


<?xml version="1.0" encoding="UTF-8"?>

<!-- Wix Project template to install Visio components -->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:visio="http://schemas.microsoft.com/wix/Visio" >

  <?define Version="1.0.0.0"?>
  <?define ProductCode = "{5205f900-bd67-456b-8d7c-494301d1d4cc}" ?>
  <?define UpgradeCode = "{86349be3-17b4-4f6a-8df3-caeb056977b4}" ?>

  <Product Id="$(var.ProductCode)" Name="GarminVisio" Language="1033" Version="$(var.Version)" Manufacturer="Garmin" UpgradeCode="$(var.UpgradeCode)">
    <Package InstallerVersion="200" Compressed="yes" />

    <!-- check taht .NET 4 (client profile at least) is installed -->
    <PropertyRef Id="NETFRAMEWORK40CLIENT" />
    <PropertyRef Id="NETFRAMEWORK40FULL" />
    <PropertyRef Id="NETFRAMEWORK45" />
   
    <Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again.">
      <![CDATA[Installed OR NETFRAMEWORK40CLIENT OR NETFRAMEWORK40 OR NETFRAMEWORK45]]>
    </Condition>

    <!-- override default license -->
    <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
   
    <!-- allow major upgrades -->
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

    <!-- allow fast installation -->
    <Property Id="MSIFASTINSTALL" Value="7" />

    <MediaTemplate EmbedCab="yes" />

    <Feature Id="ProductFeature" Title="Setup" Level="1">
      <ComponentGroupRef Id="AddinFiles"/>
      <ComponentGroupRef Id="VisioFiles"/>
    </Feature>

    <!-- UI settings -->
    <UI>
     
      <UIRef Id="WixUI_Advanced"/>
      <Property Id="ALLUSERS" Value="2" />
      <Property Id="ApplicationFolderName" Value="GarminVisio" />
      <Property Id="WixAppFolder" Value="WixPerMachineFolder" />

      <Publish Dialog="InstallScopeDlg" Control="Next" Property="MSIINSTALLPERUSER" Value="1" >WixAppFolder = "WixPerUserFolder"</Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next" Property="MSIINSTALLPERUSER" Value="{}" >WixAppFolder = "WixPerMachineFolder"</Publish>
    </UI>
   
  </Product>

  <!-- Define default directory structure -->
 
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="APPLICATIONFOLDER" Name="GarminVisio">
         
        </Directory>
      </Directory>
    </Directory>
   
    <!-- Visio files to be included in setup -->
    <ComponentGroup Id="VisioFiles" Directory="APPLICATIONFOLDER">
     
    <Component>
        <File Name="components.vss">
            <visio:PublishStencil MenuPath="GarminVisio\components" />
        </File>
    </Component>
    <Component>
        <File Name="Garmin LRUs.vss">
            <visio:PublishStencil MenuPath="GarminVisio\Garmin LRUs" />
        </File>
    </Component>
    <Component>
        <File Name="Garmin.vst">
            <visio:PublishTemplate MenuPath="GarminVisio\Garmin" />
        </File>
    </Component>
    <Component>
        <File Name="Garmin Spec.vst">
            <visio:PublishTemplate MenuPath="GarminVisio\Garmin Spec" />
        </File>
    </Component>
    <Component>
        <File Name="Misc.vss">
            <visio:PublishStencil MenuPath="GarminVisio\Misc" />
        </File>
    </Component>
    <Component>
        <File Name="OEM LRUs.vss">
            <visio:PublishStencil MenuPath="GarminVisio\OEM LRUs" />
        </File>
    </Component>
    <Component>
        <File Name="switches-buttons.vss">
            <visio:PublishStencil MenuPath="GarminVisio\switches-buttons" />
        </File>
    </Component>
    <Component>
        <File Name="title blocks.vss">
            <visio:PublishStencil MenuPath="GarminVisio\title blocks" />
        </File>
    </Component>
      <Component>
        <File Name="PitotStatic.vss">
          <visio:PublishStencil MenuPath="GarminVisio\PitotStatic" />
        </File>
      </Component>
    <Component>
        <File Name="wiring.vss">
            <visio:PublishStencil MenuPath="GarminVisio\wiring" />
        </File>
    </Component>
</ComponentGroup>
   
    <!-- Addin files to be included in setup -->
    <ComponentGroup Id="AddinFiles" Directory="APPLICATIONFOLDER">
     
      <!-- Add the addin dll to the setup. Reference using project referencing -->
      <Component>
        <File Source="$(var.GarminVisio.TargetPath)" >
         
        </File>
      </Component>
     
      <!-- VSTO framework file -->
      <Component>
        <File Source="$(var.GarminVisio.TargetDir)Microsoft.Office.Tools.Common.v4.0.Utilities.dll"></File>
      </Component>

      <!-- Add the addin manifest file -->
      <Component>
        <File Source="$(var.GarminVisio.TargetPath).manifest"></File>
      </Component>
     
      <!--  The .vsto file is addin discovery file. Set up registry to point to this file using |vstolocal -->
      <Component>
        <File Source="$(var.GarminVisio.TargetDir)$(var.GarminVisio.TargetName).vsto">
          <visio:PublishAddin />
        </File>
      </Component>
     
    </ComponentGroup>
   
  </Fragment>
</Wix>
what, me worry?

perry59

Here is the output from the MSI logging. don't know if it is helpful (but it is long) cant paste it in here!
I don't see anywhere that it updates/adds registry keys...
what, me worry?

perry59

one thing I found was that the installer does put (most) of the settings in the registry if you run it for current user rather than all users.
so you have to go to its advanced tab and select that.
Although load behavior was 2 and should have been 3. I manually changed it with regedit.
Then the addin loads on startup.
It still does not make an entry for showing the stencils/templates like it should.
what, me worry?

Nikolay

#10
One more idea. Maybe office 2007 machine specific (update issue). Can you try this:

https://support.microsoft.com/en-us/kb/976811

Quote
In Windows Vista, Click Startthe Start button, type regedit in the Start Search box, and then press ENTER.

User Account Control permission If you are prompted for an administrator password, type the password. If you are prompted for confirmation, provide confirmation.

In Windows XP, click Start, click Run, type regedit in the Open box, and then click OK.
Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\General\
On the Edit menu, point to New, and then click DWORD Value.
Type EnableLocalMachineVSTO, and then press ENTER.
Right-click EnableLocalMachineVSTO, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.

If that helps, WXS file can be updated to allow per-machine install automatically,
and I'll update the package to ensure that that is done in case of "local machine" installs for Visio 2007.

About stencils/templates. May be Visio language issue. Is target Visio 2007 language English, or?
Normally it should install the stencils/templates for all languages, but you can try to specify target on explicitly with attribute of the <Publish> element.

To set this value with WIX:

      <Component>
        <Condition>ALLUSERS=1</Condition>
        <RegistryValue Root="HKLM" Key="SOFTWARE\Microsoft\Office\12.0\Common\General" Name="EnableLocalMachineVSTO" Type="integer" Value="1"></RegistryValue>
      </Component>


Nikolay

#11
Thanks to Perry, improved the setup project (v. 1.0.8.)
Baiscally these fixes focus on ensuring smooth install experience and proper error messages for the Visio 2007:

- Ensure VSTO 4 Runtime installed in case of Visio 2007 and VSTO addin.
- Ensure SP3 is installed in case of Visio 2007 and per-machine VSTO-addin install.
- Ensure "EnableLocalVSTO" registry key is set in case of Visio 2007 and per-machine VSTO-addin install.


perry59

Quote from: Nikolay on November 03, 2016, 08:30:47 PM
Thanks to Perry, improved the setup project (v. 1.0.8.)
Baiscally these fixes focus on ensuring smooth install experience and proper error messages for the Visio 2007:

- Ensure VSTO 4 Runtime installed in case of Visio 2007 and VSTO addin.
- Ensure SP3 is installed in case of Visio 2007 and per-machine VSTO-addin install.
- Ensure "EnableLocalVSTO" registry key is set in case of Visio 2007 and per-machine VSTO-addin install.

Thank you for all your help Nikolay!
If you got my last PM's, you might make note to your users NOT to do some of the things I did  :o
what, me worry?

Nikolay