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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=IywOXcZq0AGVA3ET ojqzDqteTtSSZuQQRnvgJP74q51UF+4UINw+dBSbk5jHXEquW68/Gz1M4FQzRXTT a92XBoHz3PE6Hucf5U9qKGzszfxdNxlCkQB4LC2lCHOhumyDyitqnpTDcwCXSorf Iqbn8OeI4jYQPfsCOxReyI3bUZg= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=7CVZQXlSdGpb0XUJcKMYnx pz9xs=; b=NJqSY5VHowfMGf+5pb1XlK6VOW8VfrTy9dLuDUrrO73d1tJVpHrtfl DAUy4Jl5KpgKnKcMvRER+po69cWFsb8z3X0Td7G0oxdTy3+6p7xryyN3oQW7SBGA Yodebjbj3p3lrY1nckvHbwEM97WZujcTJYgfCozKGv0XlQADBdz+A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=2.2 required=5.0 tests=AWL,BAYES_00,EXECUTABLE_URI,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_EXEURI,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT autolearn=no version=3.3.1 spammy=Download, unrestricted, browser X-HELO: mout.gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1559674240; bh=DZsRWpvpBciwOiXJhjp9WUecZasPv0habEmU+RbvoO0=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=W3LzZV5PeS6y505BdaoDcXini1/do8wYtgP3fGksc86sMpBtQpQBz049QtXqsXFQg TrGZgz82yw+zxw9e7b3tdHvRD0Dbo0HAOckJnA/OItisq/xLXhfPkpAii8KIt+8wgD +PIMie4Yu/TUENRJw42bncywOp9ZGiekVNjWRujw= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 Subject: Re: Download setup-x86_64 issue To: cygwin AT cygwin DOT com References: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea AT mail DOT com> From: john doe Message-ID: <058d413a-2daf-b5e5-c0d1-3c3f9cea7eac@mail.com> Date: Tue, 4 Jun 2019 20:50:42 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 X-IsSubscribed: yes Note-from-DJ: This may be spam Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x54IpIkm028552 On 6/4/2019 8:09 PM, Eliot Moss wrote: > 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. > Yes, I'm using Powershell to update Cygwin through a script and the script fails at the download step. > Also, a web search suggests that wget to PowerShell is > also fine. > I meant Cygwin's wget, the idea is to not require any extra tool(s) to update Cygwin, sorry about that. > 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? > No -- se above, thanks anyway. > Anyway, this question does not seem to be cygwin-specific, but > more about PS ... Everything was working a fiew days ago, and now, it isn't. Thanks for your input. -- John Doe -- 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