> For the complete documentation index, see [llms.txt](https://docs.computle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.computle.com/onboarding/computle-end-user-guide/unattended-install.md).

# Unattended Install

This PowerShell script will automatically download and install the latest version of the NICE DCV client.

```sh
$dcvProcess = Get-Process -Name dcvviewer -ErrorAction SilentlyContinue
if ($dcvProcess) {
    Write-Host "DCV Viewer is running. Closing it..."
    Stop-Process -Name dcvviewer -Force
}

$dcvUrl = "https://d1uj6qtbmh3dt5.cloudfront.net/nice-dcv-client-Release.msi"
$dcvOutputFile = "$env:TEMP\nice-dcv-client-Release.msi"

Write-Host "Downloading the file. This may take some time..."
$dcvWebClient = New-Object System.Net.WebClient
$dcvWebClient.DownloadFile($dcvUrl, $dcvOutputFile)
Write-Host "Download completed."

Write-Host "Installing the MSI package..."
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $dcvOutputFile /quiet /norestart" -Wait
Write-Host "Installation completed."

Write-Host "Setup completed successfully."

$vsRuntimeUrl = "https://download.visualstudio.microsoft.com/download/pr/0ff148e7-bbf6-48ed-bdb6-367f4c8ea14f/bd35d787171a1f0de7da6b57cc900ef5/windowsdesktop-runtime-8.0.5-win-x64.exe"
$vsRuntimeOutputFile = "C:\Windows\Computle\installers\windowsdesktop-runtime-8.0.5-win-x64.exe"

$vsRuntimeOutputDir = [System.IO.Path]::GetDirectoryName($vsRuntimeOutputFile)
if (-not (Test-Path $vsRuntimeOutputDir)) {
    New-Item -Path $vsRuntimeOutputDir -ItemType Directory | Out-Null
}

$vsRuntimeDownloadScript = {
    param (
        [string]$downloadUrl,
        [string]$outputFile
    )

    $outputDir = [System.IO.Path]::GetDirectoryName($outputFile)
    if (-not (Test-Path $outputDir)) {
        New-Item -Path $outputDir -ItemType Directory | Out-Null
    }

    $webClient = New-Object System.Net.WebClient
    $webClient.DownloadFile($downloadUrl, $outputFile)
}

$vsRuntimeJob = Start-Job -ScriptBlock $vsRuntimeDownloadScript -ArgumentList $vsRuntimeUrl, $vsRuntimeOutputFile

Wait-Job -Job $vsRuntimeJob
Receive-Job -Job $vsRuntimeJob

Write-Host "Download completed."

Start-Process -FilePath $vsRuntimeOutputFile -ArgumentList "/quiet" -NoNewWindow -Wait
Write-Host "Installation completed."

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.computle.com/onboarding/computle-end-user-guide/unattended-install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
