-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
silent install supported? #10
Comments
You can try https://github.com/Drawbackz/DevCon-Installer/releases/tag/1.4-rc Let me know if it gives you any trouble. |
I must be missing something. I can't get it to find https://github.com/LizardByte/Sunshine/pull/2296/files |
Not sure if there is something on my end that I have not accounted for but I did notice that a hash was not specified (required) and the update command was off. You can grab the hash for the version of devcon you would like to install from devcon_sources.json Maybe this will work for you?
You can get the output of the application like this:
I am not sure if that is of any use in your situation though. |
This is working over here, but I am thinking that the process is not exactly script friendly. # Function to download and extract a zip file
function DownloadAndExtract {
param (
[string]$Uri,
[string]$OutFile
)
$maxRetries = 5
$retryCount = 0
$success = $false
while (-not $success -and $retryCount -lt $maxRetries) {
$retryCount++
Write-Host "Downloading $Uri to $OutFile, attempt $retryCount of $maxRetries"
try {
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
$success = $true
} catch {
Write-Host "Attempt $retryCount of $maxRetries failed with error: $($_.Exception.Message). Retrying..."
Start-Sleep -Seconds 5
}
}
if (-not $success) {
Write-Host "Failed to download the file after $maxRetries attempts."
exit 1
}
Expand-Archive -Path $OutFile -DestinationPath .
}
DownloadAndExtract -Uri "https://github.com/Drawbackz/DevCon-Installer/releases/download/1.4-rc/Devcon.Installer.zip" -OutFile ".\Devcon.Installer.zip"
& ".\Devcon Installer.exe" 'install' '-hash' '6ECFAF7042C525DDB6C0BF0501BECFBCE85CBDF2A33B1BCA67734FEA567AF3B8' '-addpath' '-update' |
I had a small issue where the code after the installer would run before it finished installing. This solved that and it seems to be working now (might be common knowledge, but I don't do much in PowerShell). Thanks! Start-Process -FilePath "./Devcon Installer.exe" -Wait -ArgumentList `
'install', `
'-hash', '54004C83EE34F6A55380528A8B29F4C400E61FBB947A19E0AB9E5A193D7D961E', `
'-addpath', `
'-update', `
'-dir', 'C:\Windows\System32'
Making this into a GitHub action would be cool, but definitely not necessary. |
Is silent installation supported? I'd like to use this in a GitHub runner.
The text was updated successfully, but these errors were encountered: