Browse Source

Improved Cursors function

pull/401/head
Dmitry Nefedov 2 years ago
parent
commit
6fd12038e8
  1. BIN
      Misc/Cursors.zip
  2. 0
      Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx
  3. 26
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  4. 22
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  5. 22
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  6. 27
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  7. 26
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  8. 27
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

BIN
Misc/Cursors.zip

Binary file not shown.

0
AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx → Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx

26
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -3985,13 +3985,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -4103,13 +4102,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -10763,10 +10761,10 @@ function HEIF
return return
} }
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/AppX # https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{ $Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true

22
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -2959,13 +2959,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -3077,13 +3076,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force

22
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -3330,13 +3330,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -3448,13 +3447,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force

27
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -3987,13 +3987,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -4105,13 +4104,13 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -10801,10 +10800,10 @@ function HEIF
return return
} }
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/AppX # https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{ $Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true

26
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -3465,13 +3465,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -3583,13 +3582,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -10161,10 +10159,10 @@ function HEIF
return return
} }
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/AppX # https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{ $Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true

27
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -3467,13 +3467,12 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_dark_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_dark_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "dark/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_dark_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -3585,13 +3584,13 @@ function Cursors
New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force New-Item -Path "$env:SystemRoot\Cursors\W11_light_v2.2" -ItemType Directory -Force
} }
$Parameters = @{ Add-Type -Assembly System.IO.Compression.FileSystem
Path = "$DownloadsFolder\Cursors.zip" $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\Cursors.zip")
DestinationPath = "$env:SystemRoot\Cursors\W11_light_v2.2" $ZIP.Entries | Where-Object -FilterScript {$_.FullName -like "light/*.*"} | ForEach-Object -Process {
Force = $true [IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$env:SystemRoot\Cursors\W11_light_v2.2\$($_.Name)", $true)
Verbose = $true
} }
Expand-Archive @Parameters $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force Remove-Item -Path "$DownloadsFolder\Cursors.zip" -Force
@ -10199,10 +10198,10 @@ function HEIF
return return
} }
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/AppX # https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{ $Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true

Loading…
Cancel
Save