Using custom registry keys during installation

In this KB we'll look at how to use the custom registry key feature within Scappman to deploy registry keys to devices that can then be used during installation of applications.

Deploying registry keys via Scappman is very straight forward, and in this example we'll look at TeamViewer Host

Creating the registry key

  1. Select Preferences > Registry and click Add Collection

  1. Give your collection a name and decide if it is Local Machine or Current User keys you wish to add, then click Add registry key

  1. Configure your key!

    1. Action - Create/Update

    2. Key path - Where you want the key created

    3. Value name - The name of the value you want to create

    4. Value type - SZ or DWORD

    5. Value data - The data of the value you are creating

  1. Click Next and deploy to your devices or users.

Deploying the application

You will need to utilize the licenced TeamViewer MSI to benefit from these install commands.

As Scappman only provides the free EXE version of Scappman, you will need to download and package the licenced MSI to proceed.

You can see how to add a custom app here

Enter the PowerShell commands listed below in step 4 of the custom app creation process.

## Get Registry Keys
$registryPath = "HKLM:\SOFTWARE\MSPName\TeamViewerHost"

$customConfigID = Get-ItemProperty -Path $registryPath -Name "CustomConfigID" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty "CustomConfigID"
$apiToken = Get-ItemProperty -Path $registryPath -Name "APIToken" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty "APIToken"

## Install TeamViewer Host
Execute-MSI -Action "Install" -Path "<INSTALLERFILE>" -AddParameters "CustomConfigID=$($customConfigID) APIToken=$($apiToken) AssignmentOptions=`"--alias $($envComputerName) --grant-easy-access -reassign`""

Now you can deploy TeamViewer Host to your devices, and maintain the registry keys instead of the install commands!

This can be useful if you have different CustomConfigIDs and APITokens for different groups of devices, or as an MSP where you have multiple customers but only want to manage 1 instance of the app.

Last updated