From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1344 invoked by alias); 4 Jun 2019 18:50:45 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1336 invoked by uid 89); 4 Jun 2019 18:50:45 -0000 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 Received: from mout.gmx.com (HELO mout.gmx.com) (74.208.4.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Jun 2019 18:50:44 +0000 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 Received: from johndoe65534.mail.com ([213.214.34.30]) by mail.gmx.com (mrgmxus001 [74.208.5.15]) with ESMTPSA (Nemesis) id 0MPDqY-1hTofo0AKG-004PHR for ; Tue, 04 Jun 2019 20:50:40 +0200 Subject: Re: Download setup-x86_64 issue To: cygwin@cygwin.com References: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea@mail.com> From: john doe Message-ID: <058d413a-2daf-b5e5-c0d1-3c3f9cea7eac@mail.com> Date: Tue, 04 Jun 2019 18:50:00 -0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00032.txt.bz2 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") >> =C2=A0=C2=A0=C2=A0=C2=A0 + CategoryInfo=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 : NotSpecified: (:) [], >> MethodInvocationException >> =C2=A0=C2=A0=C2=A0=C2=A0 + FullyQualifiedErrorId : DotNetMethodException >> >> >> It works for other URLs and would appriciate any input on the above. > > I just download with a web browser.=C2=A0 Any reason you have > to do this programmatically instead?=C2=A0 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.=C2=A0 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