<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TeamViewer: Update/Install and Assign]]></title><description><![CDATA[<p dir="auto"><strong>Advanced customization: TeamViewer install + assignment (PatchPro / VulnDetect)</strong></p>
<p dir="auto">This approach is for customers who want to run a PowerShell script as the installer (instead of running the MSI/EXE directly). The script installs TeamViewer from an MSI placed in the same working directory and then runs a TeamViewer assignment command.</p>
<p dir="auto">Important: the PowerShell script MUST be the primary installer. The MSI must be included as an additional file.</p>
<p dir="auto"><strong>PatchPro Instructions</strong><br />
1.	Create a new text document containing the script below.<br />
2.	Save the file as a PowerShell script (.ps1), e.g.:<br />
TVInstallAndAssign.ps1<br />
3.	Navigate to Available Applications and select TeamViewer 15 (x64) (MSI).<br />
4.	Click Custom Publish.<br />
5.	Click the downward arrow next to the Browse icon to move the TeamViewer installer into Additional Files.<br />
6.	Click the Browse icon and select your .ps1 script.<br />
7.	Remove any custom installer arguments like /qn /norestart (the script handles msiexec arguments).<br />
8.	Give the deployment a name and click Publish.</p>
<p dir="auto"><img src="/assets/uploads/files/1769161190965-pp-publish-tv-custom-resized.png" alt="PP-Publish-TV-custom.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><strong>VulnDetect - Advanced Customization Instructions</strong></p>
<p dir="auto">This method uses a PowerShell script as the installer. The script installs TeamViewer from an MSI placed in the working directory and then performs the assignment.</p>
<p dir="auto">The PowerShell script must be the installer. If it is not moved into the installer position, it will not execute.<br />
1.  Create a new text document containing the script below.<br />
2.  Save the file as a PowerShell script (.ps1), for example:<br />
TVInstallAndAssign.ps1<br />
3.  Navigate to Approvals and edit the desired Tag Approval.<br />
4.  Move the TeamViewer installer down using the blue arrow button.<br />
5.  Click Choose File and select your .ps1 script (this must be the installer).<br />
6.  Remove any installer arguments (these are handled by the PowerShell script).<br />
7.  Click Save.</p>
<p dir="auto"><img src="/assets/uploads/files/1769161203694-vd-approvals-tv-custom-resized.png" alt="VD-Approvals-TV-custom.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Prerequisites (read this)<br />
•	The script expects the TeamViewer MSI to be included as an Additional File in the same working directory as the script.<br />
•	MSI exit code 3010 is treated as success (reboot required) and will be returned as the script exit code.<br />
•	The script fails if assignment does not complete successfully (non-zero exit code or timeout).<br />
•	<strong>Replace the assignment id/token placeholder before publishing.</strong><br />
Note: The assignment method varies depending on license type, this is just an example for a specific license type.</p>
<pre><code># # ==========================================
# SecTeer: TeamViewer Install (MSI) + Assignment
# ==========================================

$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path

$LogFolder = "C:\Windows\Logs\SecTeer"
$LogFile   = Join-Path $LogFolder "TeamViewer-assign.log"

# --- Ensure log folder exists ---
if (-not (Test-Path $LogFolder)) {
    New-Item -Path $LogFolder -ItemType Directory -Force | Out-Null
}

function Write-Log {
    param([string]$Message)
    "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] $Message" |
        Out-File -FilePath $LogFile -Append -Encoding UTF8
}

Write-Log "Script started"

# --- CONFIG: assignment token (MUST be replaced before deployment) ---
$AssignmentArgs = 'assignment --id REPLACE_WITH_REAL_ASSIGNMENT_TOKEN'

# Fail fast if placeholder still present
if ($AssignmentArgs -match 'REPLACE_WITH_REAL_ASSIGNMENT_TOKEN') {
    Write-Log "ERROR: Assignment token placeholder not replaced. Aborting."
    exit 1
}

# --- Locate MSI next to this script (supports .msi and .msi.msi) ---
$MsiMatches = Get-ChildItem -Path $ScriptDir -File |
    Where-Object { $_.Name -match '^TeamViewer.*\.msi(\.msi)?$' }

if (-not $MsiMatches -or $MsiMatches.Count -eq 0) {
    Write-Log "ERROR: No TeamViewer MSI found in $ScriptDir"
    Get-ChildItem -Path $ScriptDir -File | ForEach-Object {
        Write-Log "Found file: $($_.Name)"
    }
    exit 1
}

if ($MsiMatches.Count -gt 1) {
    Write-Log "ERROR: Multiple TeamViewer MSI files found:"
    $MsiMatches | ForEach-Object { Write-Log " - $($_.FullName)" }
    exit 1
}

$MsiPath = $MsiMatches[0].FullName
Write-Log "Using MSI: $MsiPath"

# --- Install TeamViewer ---
Write-Log "Starting TeamViewer MSI installation"

$msiArgs = "/i `"$MsiPath`" /qn /norestart"
$msiProc = Start-Process -FilePath "$env:WINDIR\System32\msiexec.exe" `
    -ArgumentList $msiArgs `
    -Wait `
    -NoNewWindow `
    -PassThru

$msiCode = [int]$msiProc.ExitCode
Write-Log "MSI exited with code: $msiCode"

# Accept 0 (success) and 3010 (success, reboot required)
if ($msiCode -ne 0 -and $msiCode -ne 3010) {
    Write-Log "ERROR: MSI installation failed"
    exit $msiCode
}

# --- Allow post-install finalization ---
Start-Sleep -Seconds 10

# --- Locate TeamViewer executable ---
$TvExeCandidates = @(
    "C:\Program Files\TeamViewer\TeamViewer.exe",
    "C:\Program Files (x86)\TeamViewer\TeamViewer.exe"
)

$TvExe = $TvExeCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1

if (-not $TvExe) {
    Write-Log "ERROR: TeamViewer executable not found"
    $TvExeCandidates | ForEach-Object { Write-Log "Checked: $_" }
    exit 1
}

Write-Log "Using TeamViewer executable: $TvExe"

# --- Assignment ---
Write-Log "Starting TeamViewer assignment"
Write-Log "Executing: `"$TvExe`" $AssignmentArgs"

$tvProc = Start-Process -FilePath $TvExe `
    -ArgumentList $AssignmentArgs `
    -PassThru `
    -NoNewWindow

$TimeoutMs = 120000
if (-not $tvProc.WaitForExit($TimeoutMs)) {
    Write-Log "ERROR: Assignment timed out after $([int]($TimeoutMs/1000)) seconds"
    try { $tvProc.Kill() } catch {}
    exit 1
}

$tvCode = [int]$tvProc.ExitCode
Write-Log "Assignment exited with code: $tvCode"

if ($tvCode -ne 0) {
    Write-Log "ERROR: TeamViewer assignment failed"
    exit $tvCode
}

Write-Log "TeamViewer installation and assignment completed successfully"

# Per requirement: propagate installer exit code
exit $msiCode
</code></pre>
]]></description><link>https://vulndetect.org/topic/2759/teamviewer-update-install-and-assign</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 19:08:15 GMT</lastBuildDate><atom:link href="https://vulndetect.org/topic/2759.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Jan 2026 14:58:01 GMT</pubDate><ttl>60</ttl></channel></rss>