delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/04/14:10:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=V8kFfwmFQXvJnkZt
DN4BaI0HXrTBdXPFy9UMPW8RENwPs796Ms3WOAGrAU0nONvcKUaiTXLJSF8TkoV0
4Q+JAC1dmMVrZpjU5eOfioDPua/5ezaOoCj5AzbaFosC5cnSKYayMUpywHZgWStF
qh07I9aOAO1aIYCfmuSKxgQ9/hM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Yadj6YVXCaLZpxqrhzZ1Hr
s3t+Q=; b=lV3PITCh56XuY9Yx1PjYyvxPxX0J1yXrQCth/58Ej3ZuOjI32qzmAO
80Ecz6cOeuPvQg+ZhJ1Nyno9tZW+qrBYlcP8bMlypyHWuZ9W8f0fQ5qm7nju9vZq
xkdEfkAQ/E6xJnYOJeXkfxC7q3A6P9w3BT1yCCAxvMjXqJjHZ9IGs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=AWL,BAYES_00,EXECUTABLE_URI,KAM_EXEURI,SPF_PASS,WEIRD_PORT autolearn=no version=3.3.1 spammy=Download, unrestricted, browser
X-HELO: mailsrv.cs.umass.edu
Reply-To: moss AT cs DOT umass DOT edu
Subject: Re: Download setup-x86_64 issue
To: cygwin AT cygwin DOT com
References: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea AT mail DOT com>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Message-ID: <a10e2575-cc93-cda1-bd87-6c081949c44d@cs.umass.edu>
Date: Tue, 4 Jun 2019 14:09:24 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
MIME-Version: 1.0
In-Reply-To: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea@mail.com>
X-IsSubscribed: yes
Note-from-DJ: This may be spam

On 6/4/2019 2:00 PM, john doe wrote:
> Hi, I'm trying to download the setup file to update cygwin using
> powershell but it fails miserably:
> 
> PS > (new-object system.net.webclient).do
> wnloadfile("https://www.cygwin.com/setup-x86_64.exe", "$PWD/try.exe")
> Exception calling "DownloadFile" with "2" argument(s): "The underlying
> connecti
> on was closed: An unexpected error occurred on a send."
> At line:1 char:47
> + (new-object system.net.webclient).downloadfile <<<<
> ("https://www.cygwin.com/
> setup-x86_64.exe", "$PWD/try.exe")
>      + CategoryInfo          : NotSpecified: (:) [],
> MethodInvocationException
>      + FullyQualifiedErrorId : DotNetMethodException
> 
> 
> It works for other URLs and would appriciate any input on the above.

I just download with a web browser.  Any reason you have
to do this programmatically instead?  Also, I know little
about PS, but it could be that it just doesn't approve of
this as a Microsoft-blessed kind of thing.  When I invoke
setup, I get popups about this not being from the Windows
Store, etc. -- simply plow on.

Also, a web search suggests that wget to PowerShell is
also fine.

And here's another tidbit from the web:

powershell -NoProfile -ExecutionPolicy unrestricted -Command (new-object 
System.Net.WebClient).Downloadfile('http://10.10.10.10:7000/iw4455.exe', 'C:\windows\temp\iw4455.exe')

Perhaps the ExecutionPolicy thing is relevant here?

Anyway, this question does not seem to be cygwin-specific, but
more about PS ...

Best wishes - EM

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019