public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Download setup-x86_64 issue
@ 2019-06-04 18:00 john doe
  2019-06-04 18:09 ` Eliot Moss
  0 siblings, 1 reply; 3+ messages in thread
From: john doe @ 2019-06-04 18:00 UTC (permalink / raw)
  To: cygwin

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.


P.S.

Using Wget on this w7works.

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Download setup-x86_64 issue
  2019-06-04 18:00 Download setup-x86_64 issue john doe
@ 2019-06-04 18:09 ` Eliot Moss
  2019-06-04 18:50   ` john doe
  0 siblings, 1 reply; 3+ messages in thread
From: Eliot Moss @ 2019-06-04 18:09 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Download setup-x86_64 issue
  2019-06-04 18:09 ` Eliot Moss
@ 2019-06-04 18:50   ` john doe
  0 siblings, 0 replies; 3+ messages in thread
From: john doe @ 2019-06-04 18:50 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-04 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 18:00 Download setup-x86_64 issue john doe
2019-06-04 18:09 ` Eliot Moss
2019-06-04 18:50   ` john doe

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).