- For the web server that does not support content range requests. You have to set priority to FOREGROUND to force the job to run synchronously. Otherwise, error: BG_E_INSUFFICIENT_RANGE_SUPPORT (0x80200013)
bitsadmin /transfer MyJob /priority FOREGROUND "http://your-site.org/file.zip" "C:\test\file.zip"
- For the web server with self signed certificate or could not pass the ssl certificate validation, you cannot use a single bitsadmin /transfer command and the job has to be run asynchronously. You have to bitsadmin /create a job and bitsadmin /SetSecurityFlags to value 30
bitsadmin /create MyJob1 bitsadmin /addfile MyJob1 "https://your-site.org/file.zip" "C:\test\file.zip" bitsadmin /SetSecurityFlags MyJob1 30 bitsadmin /SetPriority MyJob1 FOREGROUND bitsadmin /resume MyJob1 bitsadmin /monitor || bitsadmin /cancel MyJob1
Search This Blog
Windows Batch Script: download file using bitsadmin without ssl certification validation
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment