public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
Subject: Re: Download setup-x86_64 issue
Date: Tue, 04 Jun 2019 18:09:00 -0000	[thread overview]
Message-ID: <a10e2575-cc93-cda1-bd87-6c081949c44d@cs.umass.edu> (raw)
In-Reply-To: <4cd0cd23-a0fd-eb57-70ae-188a0b7c64ea@mail.com>

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

  reply	other threads:[~2019-06-04 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 18:00 john doe
2019-06-04 18:09 ` Eliot Moss [this message]
2019-06-04 18:50   ` john doe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a10e2575-cc93-cda1-bd87-6c081949c44d@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).