# Automated installation

Improve consistency of installation settings, and distribute serial numbers or a license file (reg*.txt or .slip), to a large number of machines with automated installation of Visual Assist.

Steps for automated installation vary by IDE(s) installed. If you want to install Visual Assist to IDEs from multiple categories, run multiple sets of instructions.

#### Purchase before February 20, 2019

If you purchased a license of Visual Assist, or renewed maintenance, before February 20, 2019, you received a two-line activation key, not a serial number. Follow instructions in Legacy - Automated installation.

#### Visual Studio 2015 and newer, per user account

To install Visual Assist in an automated manner, download the latest VSIX installer from the Microsoft Visual Studio Marketplace. (Due to the inability of the IDE to disable notifications of updates per extension, VSIX installers are available in the Marketplace one to two weeks after general release on the Whole Tomato website. Contact support if you need a VSIX installer that is not yet available in the Marketplace.)

Install the VSIX from the command line, on every machine and from every user account that requires Visual Assist. With the /q parameter, Visual Assist is installed quietly for the user to every IDE supported by the VSIX. Without /q, the VSIX installer prompts for the IDEs to which it should install Visual Assist.

User accounts that require Visual Assist do not require administrator privileges.

Run the VSIX installer from the administrator account only if the administrator requires Visual Assist.

Example invocation of the VSIX installer:

%ProgramFiles(x86)%\Microsoft Visual Studio <IDE version>\Common7\IDE\VsixInstaller.exe /q VA_X_Setup2318.vsix

#### Registration with serial numbers

Before loading Visual Assist for the first time, store a serial number and licensing portal credentials in the registry of the target Windows accounts. Store the information via registry scripts. Unfortunately, each user of Visual Assist must have an assigned serial number so the registry scripts must vary slightly per user.

Although serial numbers are assigned per user, credentials to the licensing portal account under which the serial numbers will be registered can differ per user, or can be shared by multiple all users. If each user of Visual Assist has a licensing portal account, each user can request and receive technical support for the software. If one licensing portal account is shared by multiple users, only the individual associated with the shared account can request and receive technical support.

Create a registry script for each user, with differing serial numbers, and with differing or shared credentials to the licensing portal:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Whole Tomato\Visual Assist X]
"AutoRegSerialNumber"="<serial number>"
"AutoRegPortalUser"="<account name or email>"
"UserKey"=-

; For 64-bit operating systems, add (keep the section above as well):
[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Whole Tomato\Visual Assist X]
"AutoRegSerialNumber"="<serial number>"
"AutoRegPortalUser"="<account name or email>"
"UserKey"=-


Execute each registry script from the appropriate Windows user accounts to install information to the HKCU hive.

#### Registration with a license file (reg*.txt or .slip)

Store your license file in a location accessible to all PCs that need to register Visual Assist.

Create a registry script that references the location of your license file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Whole Tomato\Visual Assist X]
"UserKey"=-

; For 64-bit operating systems, add (keep the section above as well):
[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Whole Tomato\Visual Assist X]
"UserKey"=-


Execute the registry script from the appropriate Windows user accounts to install information to the HKCU hive.

If you use a method other than a registry script to populate the registry, escaped backslashes may not be required.  Likewise if you use a REGEDIT4 script rather than version 5.

The first time Visual Assist loads after a registry script is executed on a PC, Visual Assist will register itself from information it finds in the HKCU hive. After registration, Visual Assist will delete information from the registry to prevent unauthorized access to it.

#### Visual Studio 2012-2013, per user account

Contact support to obtain a VSIX installer specifically for Visual Studio 2012-2013 and follow the automated installation instructions for Visual Studio 2015 and newer.

#### Visual Studio 2010, per user account

Contact support to obtain a VSIX installer specifically for Visual Studio 2010 and follow the automated installation instructions for Visual Studio 2015 and newer.

#### Visual Studio 2008 and older; requires administrator privileges

Run the .exe from the command line, with parameters, only once on every machine that requires Visual Assist. Run the .exe from an account that has administrator privileges, or from a script that impersonates an administrator.

Visual Assist installs itself to every IDE it finds.

Use /D to specify an installation directory, used only for Visual Studio 2008 and older.

Without the /D parameter, /S forces Visual Assist to install itself in the default directory. (Without /D and /S, Visual Assist prompts for an installation directory.)

If you need to install an activation key for a new license of Visual Assist, or for a renewal of maintenance, use a registry script as described above for Visual Studio 2015.

Parameter Description
/S Silent install: no input prompts
/D Installation directory: if unspecified, defaults to %ProgramFiles(x86)%\Visual Assist X

Example to install Visual Assist in a specific directory for Visual Studio 2008 and older:

VA_X_Setup2118.exe /S /D "e:\tools\va"

Example to install Visual Assist in the default directory, and if a key is required, let Visual Assist prompt for it when an IDE is launched:

VA_X_Setup2118.exe /S