I have created many Visio solutions over the past 25 years and used a number of methods of creating an installation that includes Visio templates and stencils. I have just wasted many hours trying to debug an installation created with Advanced Installer until I realised that the problem was that Visio was not properly updating the cache of installed templates and stencils. In the end, the answer was to delete the cache and let Visio re-create it. The screenshots below show the custom shapes opened with the custom template and the More Shapes context menu. Before I deleted the cache, Visio incorrectly displayed the file name of some of the stencils (those with a trailing “_M” ) rather than the display name as entered into the PublishComponent table in Advanced Installer. In addition, the context menu did not show those stencils as being present in the workspace.
[Read more…] about Refreshing the cached installed files of VisioDeployment
New Requirement for VBA Digital Signatures in Visio
Like most developers, I have to buy a new digital certificate every 3 years to sign my Visio add-ins and VBA projects. Usually that means verifying my bone fides, paying the fee and downloading the certificate, but security has been increased, and now, like everyone else, I have to use a USB key with it on (see Code signing changes in 2023 (digicert.com)). This requires the use of an application such as one from SafeNet that enables the signing of code. This is working for my Visio addins written with Visual Studio, but the VBA macros appeared to be signing until I tried to save the document. I was unable to save the document with the certificate applied:
[Read more…] about New Requirement for VBA Digital Signatures in VisioAdvanced Installer now Supports Visio VSTO Add-Ins
Advanced Installer now supports creating VSTO Visio Add-Ins installation projects using the Office Add-Ins wizard! This is great news for those of us who are still having to create VSTO Add-Ins, especially since Visual Studio does not include Setup & Deployment projects (again).
[Read more…] about Advanced Installer now Supports Visio VSTO Add-InsUsing Advanced Installer with Viso VSTO Add-Ins
I have written many add-ins for Visio over the years, some for private clients for use in-house, some as products for public release by my clients or by me, and some just to help me with my day-to-day Visio development tasks. The ease of installation is always an issue, and I have been using a digital certificate to guarantee its authenticity in almost all of these scenarios. I have also included licensing code from a third-party for some of my own products, but have been aware that the third-party product I have been using is not ideal because it needs its own registered component on the client machine. So, when a client asked that I use Advanced Installer to create the installation setups so that their licensing system could be used, then I was (and still am) all for it because it could become a better method for myself. However, there are some issues that I am overcoming through this transition ….not least that an apparently correctly assigned digital certificate was actually not valid.
[Read more…] about Using Advanced Installer with Viso VSTO Add-InsReading the registry for Visio settings
I love writing Visio automation code, but I really don’t like writing setup & deployment scripts. There are so many variables : What Visio version, which edition? Which bitness (x86 or x64)? What are the user settings for the paths of stencils or templates?
So, I decided to write myself some C# functions that can be used in custom actions for an installation writing application, such as Advanced Installer. I think of the methods as being in one of three phases, Installation; Functionality and Configuration. The registry has three different areas to search within, Classes Root (HKCR); Local Machine (HKLM) and Current User (HKCU). In addition, the best way to get the true file version of Visio is to use FileInfo on the executable. The following screenshots are from a Cross-Functional Flowchart of the functions that get values for variables, and use them in other functions, until, eventually, the current user settings can be read.
Each of the functions I wrote handle the part of the registry that needs to be used. By that I mean that some settings for 64bit Visio on 64bit Windows will be in a different branch than 32bit Visio on 64bit Windows.
The first function gets the current version of the application associated with Visio drawings:
Checking the Bitness of Microsoft Office, Visio Viewer and Visio
Visual Studio setup an deployment projects require the target “bitness” of target Windows operating system to be set. This means that I have to create two installation files, one for 32bit and one for 64bit Windows for my Visio add-ins, for example.
The bitness of an individual Visio application can be checked from the File / Account / About Visio dialog, and similar screens are available in other Office applications:
64bit Windows users can install either 32bit or 64bit Microsoft Office, which will install the relevant Visio Viewer package. The installed edition of Visio should then match the installed edition of Office.
Any Visio add-in installations need to match the bitness of the installed Visio application.