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

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce

 

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

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! http://pastebin.com/SNzSP2Xw

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

 

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 10.00 out of 5)
Loading...