File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,16 @@ function Invoke-CLR4PowerShellCommand {
43
43
$ErrorActionPreference = ' Stop'
44
44
Set-StrictMode - Version Latest
45
45
46
- Invoke-CLR4PowerShellCommand - ScriptBlock {
47
- [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12; iex ((new-object net.webclient).DownloadString(' https://chocolatey.org/install.ps1' ))
46
+ $isWin8 = wmic os get caption | find / i ' " 8 "'
47
+ $isWin2012 = wmic os get caption | find / i ' " 2012 "'
48
+
49
+ # skip wrapping for 8 or 2012?
50
+ if ($isWin8 -or $isWin2012 ){
51
+ [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12; iex ((new-object net.webclient).DownloadString(' https://chocolatey.org/install.ps1' ))
52
+ }else {
53
+ Invoke-CLR4PowerShellCommand - ScriptBlock {
54
+ [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12; iex ((new-object net.webclient).DownloadString(' https://chocolatey.org/install.ps1' ))
55
+ }
48
56
}
49
57
50
58
# cribbed from https://gist.github.com/jstangroome/882528
You can’t perform that action at this time.
0 commit comments