From bab8777bd9844f3a51b6d385fa74c5b7cff92976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20Dehopr=C3=A9?= Date: Mon, 24 Aug 2015 11:55:57 +0200 Subject: [PATCH 1/2] add default proxy support to dnvminstall.ps1 Retrieve the default proxy settings from the system and also set the proxy credentials from the system too --- dnvminstall.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dnvminstall.ps1 b/dnvminstall.ps1 index 765cde2e58..ac3a38e6c3 100644 --- a/dnvminstall.ps1 +++ b/dnvminstall.ps1 @@ -7,6 +7,8 @@ if (!(Test-Path $tempPath)) { md $tempPath | Out-Null } $webClient = New-Object System.Net.WebClient +$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy +$webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path" $webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $dnvmPs1Path) Write-Host "Downloading DNVM.cmd to $dnvmCmdPath" From 17bd0c8e61ee175c54fea9af753d42f74632486d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20Dehopr=C3=A9?= Date: Mon, 24 Aug 2015 12:14:01 +0200 Subject: [PATCH 2/2] update install commands for Windows update both CMD and Powershell install commands for Windows to include the configuration of the corporate proxy --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b17cc621f4..14138309fc 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,12 @@ If you don't want to install Visual Studio or want to upgrade DNVM to the latest ####CMD ``` -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" +@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';$wc=New-Object System.Net.WebClient;$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;Invoke-Expression ($wc.DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" ``` ####Powershell ``` -&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} +&{$Branch='dev';$wc=New-Object System.Net.WebClient;$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;Invoke-Expression ($wc.DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} ``` This will download the DNVM script and put it in your user profile. You can check the location of DNVM by running the following in a cmd prompt: