MS Visio Viewer

Visio Viewer 2016

<package
	id="visioviewer"
	name="Microsoft Visio Viewer"
	revision="%PKG_VERSION%"
	reboot="false"
	priority="0">
	
	<variable name="PKG_VERSION" 		value="16.0.4339.1001" />
	<variable name="PKG_SOURCE"		value="%SOFTWARE%\Microsoft\VisioViewer\%PKG_VERSION%\x86" architecture="x86" />
	<variable name="PKG_SOURCE"		value="%SOFTWARE%\Microsoft\VisioViewer\%PKG_VERSION%\x64" architecture="x64" />
	<variable name="PKG_NAME"		value="vviewer.msi" />	
	<variable name="PKG_INSTALL_SWITCH"	value="/quiet /passive /norestart ALLUSERS=1 ACCEPTEULA=1 ASSOCIATE=1" />


	<check type="uninstall" condition="exists" path="Microsoft Visio Viewer 2016" />
		
	<install cmd='msiexec /i "%PKG_SOURCE%\%PKG_NAME%" %PKG_INSTALL_SWITCH%' />
		
	<upgrade include='remove' />
	<upgrade include='install' />

	<remove  cmd='wmic product where "name like &apos;%%Visio Viewer%%&apos;" call uninstall' />

</package>

Tested on Windows 10 and Viewer 16.

Or you can use remover from installer msi:

	<variable name="PKG_REMOVE_SWITCH"	value="/quiet /passive /norestart" />	
	<remove  cmd='msiexec /x %PKG_SOURCE%\%PKG_NAME% %PKG_REMOVE_SWITCH%' />

Visio Viewer 2013

This is a silent installer and deinstaller for Microsoft Office Visio Viewer 2007. Download [1] from microsoft, unpack it using winzip (or similar software). Save vviewer.msi and vviewer.cab in your software directory.

<package id="visiovwr2k13" name="Microsoft Visio Viewer 2007" revision="1" reboot="false" priority="0">
        
		<check type="logical" condition="or">	
		<check type="uninstall" condition="exists" path="Microsoft Office Visio Viewer 2013" />
		<check type="uninstall" condition="exists" path="Microsoft Office Visio Professional 2013" />
		<check type="uninstall" condition="exists" path="Microsoft Office Visio Professional 2010" />
		</check>

		<install cmd='msiexec /qb /i "\\bunoteca\wpkg\packages\microsoft\visiovwr2k13\vviewer.msi"'/>
		<remove  cmd='msiexec /qn /x "\\bunoteca\wpkg\packages\microsoft\visiovwr2k13\vviewer.msi"' />
	</package>

Visio Viewer 2007 SP2

This is the silent installer for Microsoft Office 2007 Visio Viewer. As it's name says - it allows you to view Microsoft Visio's files without having the full Version of Visio installed.

First you need to download the setup file from: Microsoft's download page (link here - click). You'll find an .exe file which needs to be unpacked using an application like the excellent 7zip, you'll find five files inside:

vviewer.cab
files12.cat
vviewer.msi
EULA
eula.txt

Copy them to your WPKG installation share, in my case it is %SOFTWARE%\Microsoft\visiovwr2k7

Next download the Visio Viewer 2007 Service Pack 2 file from here. You will have a compressed executable called visioviewer2007sp2-kb953335-fullfile-en-us.exe. Once again use 7zip to extract the contents.

You will end up with four files, one called VViewersp2-en-us which should be about 10,001KB in size, rename this file to VViewersp2-en-us.msp and copy to your install location as above.


Now edit the package xml to look something like this:

 <package
        id="visiovwr2k7"
        name="Microsoft Visio Viewer 2007"
        revision="1"
        reboot="false"
        priority="0">
        
	<check type="logical" condition="or">	
	<check type="uninstall" condition="exists" path="Microsoft Office Visio Viewer 2007" />
	<check type="uninstall" condition="exists" path="Microsoft Office Visio Professional 2003" />
	<check type="uninstall" condition="exists" path="Microsoft Office Visio Professional 2007" />
	</check>
		
	<install cmd='msiexec /i "%SOFTWARE%\Microsoft\visiovwr2k7\vviewer.msi" PATCH="%SOFTWARE%\Microsoft\visiovwr2k7\VViewersp2-en-us.msp" /qb-'/>
 
	<remove  cmd='msiexec /x "%SOFTWARE%\Microsoft\visiovwr2k7\vviewer.msi /qn' />
 
 </package>

The checks mean Visio Viewer won't be installed if you already have the full Visio installed including Visio Prof 2003 (as you should have the file format converter installed if so).

The install cmd patches Visio Viewer 2007 to service Pack 2 during the install, I couldn't find a way to pre-patch the MSI but this works well.

And don't forget to update your profiles. Set your package priority to lower than that of your full Visio pacakages so this isn't installed unnecessarily.