From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16625 invoked by alias); 4 Jun 2019 18:09:28 -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 16618 invoked by uid 89); 4 Jun 2019 18:09:28 -0000 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 Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Jun 2019 18:09:26 +0000 Received: from [192.168.0.15] (c-24-62-203-86.hsd1.ma.comcast.net [24.62.203.86]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 3858C4024970; Tue, 4 Jun 2019 14:09:25 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: Download setup-x86_64 issue To: cygwin@cygwin.com References: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea@mail.com> From: Eliot Moss Message-ID: Date: Tue, 04 Jun 2019 18:09:00 -0000 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00031.txt.bz2 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