Installing VSTO run once

VSTOHow to uninstall vsto

“%CommonProgramFiles%\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe” /uninstall \\path\to\vsto\AddIn.vsto

How to silently install vsto

“%CommonProgramFiles%\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe” /install /silent \\path\to\vsto\AddIn.vsto

How to install via group policy

Bat Login Script

@echo off
REM Check for presence of vsto key first if not found run installer
reg query HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\DCCWord2010 /e >nul 2>nul || ("C:\Program Files\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /I "\\path\to\vsto\AddIn.vsto" /S)

Turns out using this




vbs file via run registry  ( The advantage of using this is it runs once for each user however they will need to log in twice if they are logged off!)


 Turns out using this registy value HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce The user needs to be a local administrator…

So we had to put the value inside here : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run , and let the file remove it after running

Group Policy Registry key to add to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Link as my hosting doesn’t allow these file types!

vbs script

Dim commandDim WshShellcommand=chr(34) & "%CommonProgramFiles%\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" & chr(34) & " /Silent /Install " & chr(34) & "\\path\to\vsto\AddIn.vsto" & chr(34)
Set WshShell = WScript.CreateObject("WScript.Shell")WshShell.Run command
'Delete the Run Key to make sure it runs once - we cannot put this in the run one registry due to users not being administrators
Const HKEY_CURRENT_USER = &H80000001
strComputer = "." Set objRegistry=GetObject("winmgmts:\\" & _  strComputer & "\root\default:StdRegProv") strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Run"strValueName = "ExternalPDatabases"
objRegistry.DeleteValue HKEY_CURRENT_USER, strKeyPath, strValueName


VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Installing VSTO run once, 10.0 out of 10 based on 1 rating

Tags: bat, batch file, group policy, install, registry, runonce, VBS, vsto

Trackback from your site.