Skip to content

Commit 4abdeb7

Browse files
committed
Update chocolateyinstall.ps1
1 parent c3bdf30 commit 4abdeb7

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

Scripts/Chocolatey/tools/chocolateyinstall.ps1

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,21 @@ $JSONVersions = Invoke-RestMethod @Parameters
2727

2828
$packageParameters = $env:chocolateyPackageParameters
2929

30-
(Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber
31-
(Get-CimInstance -ClassName CIM_Processor).Caption
32-
3330
switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
3431
{
3532
"17763"
3633
{
37-
# Check for Windows 10 LTSC 2019
38-
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2019")
39-
{
40-
$LatestRelease = $JSONVersions.Sophia_Script_Windows_10_LTSC2019
41-
$URL = "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$LatestGitHubRelease/Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip"
42-
$Hash = "Hash_Sophia_Script_Windows_10_LTSC2019"
43-
}
34+
# Windows 10 LTSC 2019
35+
$LatestRelease = $JSONVersions.Sophia_Script_Windows_10_LTSC2019
36+
$URL = "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$LatestGitHubRelease/Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip"
37+
$Hash = "Hash_Sophia_Script_Windows_10_LTSC2019"
4438
}
4539
"19044"
4640
{
47-
# Check for Windows 10 LTSC 2021
48-
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2021")
49-
{
50-
$LatestRelease = $JSONVersions.Sophia_Script_Windows_10_LTSC2021
51-
$URL = "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$LatestGitHubRelease/Sophia.Script.for.Windows.10.LTSC.2021.v$LatestRelease.zip"
52-
$Hash = "Hash_Sophia_Script_Windows_10_LTSC2021"
53-
}
41+
# Windows 10 LTSC 2021
42+
$LatestRelease = $JSONVersions.Sophia_Script_Windows_10_LTSC2021
43+
$URL = "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$LatestGitHubRelease/Sophia.Script.for.Windows.10.LTSC.2021.v$LatestRelease.zip"
44+
$Hash = "Hash_Sophia_Script_Windows_10_LTSC2021"
5445
}
5546
"19045"
5647
{
@@ -116,15 +107,10 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
116107
}
117108
}
118109
}
119-
Default
120-
{
121-
$LatestRelease = $JSONVersions.Sophia_Script_Windows_10_PowerShell_5_1
122-
$URL = "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$LatestGitHubRelease/Sophia.Script.for.Windows.10.v$LatestRelease.zip"
123-
$Hash = "Hash_Sophia_Script_Windows_10_PowerShell_5_1"
124-
}
125110
}
126111

127-
Write-Host "url: $url, url64bit: $url64bit"
112+
Write-Host "url: $url, url64bit: $url64bit, Hash: $Hash"
113+
128114
$Downloads = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
129115
$Parameters = @{
130116
packageName = $env:ChocolateyPackageName

0 commit comments

Comments
 (0)