Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions provisionersdk/scripts/bootstrap_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while ($true) {
# https://github.com/microsoft/vscode-remote-release/issues/5699
$BINARY_URL="${ACCESS_URL}/bin/coder-windows-${ARCH}.exe"
Write-Output "Fetching coder agent from ${BINARY_URL}"
Invoke-WebRequest -Uri "${BINARY_URL}" -OutFile $env:TEMP\sshd.exe
Invoke-WebRequest -Uri "${BINARY_URL}" -OutFile $env:TEMP\coder.exe
break
} catch {
Write-Output "error: unhandled exception fetching coder agent:"
Expand All @@ -26,7 +26,7 @@ while ($true) {
}

# If the below fails, retrying probably will not help.
Set-MpPreference -DisableRealtimeMonitoring $true -ExclusionPath $env:TEMP\sshd.exe
Set-MpPreference -DisableRealtimeMonitoring $true -ExclusionPath $env:TEMP\coder.exe
$env:CODER_AGENT_AUTH = "${AUTH_TYPE}"
$env:CODER_AGENT_URL = "${ACCESS_URL}"
Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "agent" -PassThru
Start-Process -FilePath $env:TEMP\coder.exe -ArgumentList "agent" -PassThru