Closed arizvisa closed 4 years ago
This seems to work on the following so far. Going to test win7 and then merge it if those work too. eval-win81x86-enterprise.json eval-win81x64-enterprise.json
Wow. So it seems that there isn't a way to tell if a BitsAdmin job has failed. If it gets incorrect parameters, a badly formed url, or the download fails, it returns an errorlevel of 0. If you try using /info
, /geterror
, or /geterrorcount
. Regardless if it was successful or not, the job is done and doesn't exist anymore...so it always fails.
I thought maybe because /geterror
displays a number, we could parse the command output if we could silence it. I tried but I couldn't figure out how to disable its logo to parse it. It seems like we could use findstring
to filter its output and then parse it like that, but spinning in a loop and
It seems I couldn't figure out how to disable its logo to parse it.
Seems like on the eval-win7x64-enterprise.json template, 7-zip can't be installed due to error code 1620. Looking more into what this error is actually based on....
Turns out that this error was due to the 7-zip url being a redirect and it being downloaded instead of redirecting to the correct url. This is fixed by a command-line option which was added in PR #240.
This PR tampers with all of the scripts so that they explicitly depend on
_download.cmd
. Technically they were doing that before, but they'd always fall back to using Powershell when failing which would also fail because_download.cmd
was doing the exact same thing. Now we just fail the scripts at their beginning if we're unable to find the cached file and are unable download it.The
_download.cmd
script was also refactored to change the order of the downloads that are tried. Now we give powershell priority, fallback towget.exe
, and then trybitsadmin.exe
as a last resort. The powershell downloader also requires and sets the minimum security protocol version to Tls 1.2. This is due to the reason that most of tools that we're downloading are now being hosted on a Tls 1.2-only webserver which had broken most of the templates.This closes issue #238.