Browse Source

Fixed typo

Small fixes
master 6.5.3
Dmitry Nefedov 1 year ago
parent
commit
afcc554bfc
  1. 26
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 26
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  3. 26
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  4. 26
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  5. 26
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  6. 26
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

26
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -7707,7 +7707,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7715,7 +7715,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7736,7 +7736,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7744,7 +7744,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7765,7 +7765,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7773,7 +7773,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7794,7 +7794,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7802,7 +7802,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7823,7 +7823,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7831,7 +7831,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7846,13 +7846,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7860,7 +7860,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

26
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -6346,7 +6346,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6354,7 +6354,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6375,7 +6375,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6383,7 +6383,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6404,7 +6404,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6412,7 +6412,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6433,7 +6433,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6441,7 +6441,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6462,7 +6462,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6470,7 +6470,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6485,13 +6485,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6499,7 +6499,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

26
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -6733,7 +6733,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6741,7 +6741,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6762,7 +6762,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6770,7 +6770,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6791,7 +6791,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6799,7 +6799,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6820,7 +6820,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6828,7 +6828,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6849,7 +6849,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6857,7 +6857,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -6872,13 +6872,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -6886,7 +6886,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

26
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -7712,7 +7712,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7720,7 +7720,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7741,7 +7741,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7749,7 +7749,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7770,7 +7770,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7778,7 +7778,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7799,7 +7799,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7807,7 +7807,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7828,7 +7828,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7836,7 +7836,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7851,13 +7851,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7865,7 +7865,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

26
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -7616,7 +7616,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7624,7 +7624,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7645,7 +7645,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7653,7 +7653,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7674,7 +7674,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7682,7 +7682,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7703,7 +7703,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7711,7 +7711,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7732,7 +7732,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7740,7 +7740,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7755,13 +7755,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7769,7 +7769,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

26
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -7618,7 +7618,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7626,7 +7626,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI Set-UserShellFolder -UserFolder Desktop -FolderPath "$env:USERPROFILE\Desktop" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7647,7 +7647,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7655,7 +7655,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI Set-UserShellFolder -UserFolder Documents -FolderPath "$env:USERPROFILE\Documents" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7676,7 +7676,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7684,7 +7684,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI Set-UserShellFolder -UserFolder Downloads -FolderPath "$env:USERPROFILE\Downloads" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7705,7 +7705,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7713,7 +7713,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI Set-UserShellFolder -UserFolder Music -FolderPath "$env:USERPROFILE\Music" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7734,7 +7734,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
do do
{ {
$Choice = Show-Menu -Title $Title -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title $Title -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7742,7 +7742,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI Set-UserShellFolder -UserFolder Pictures -FolderPath "$env:USERPROFILE\Pictures" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose
@ -7757,13 +7757,13 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose Write-Verbose -Message ($Localization.UserDefaultFolder -f [WinAPI.GetStr]::GetString(21791)) -Verbose
# Extract the localized "Pictures" string from shell32.dll # Extract the localized "Pictures" string from shell32.dll
$CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Videos" $CurrentUserFolderLocation = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video"
Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose Write-Verbose -Message ($Localization.CurrentUserFolderLocation -f [WinAPI.GetStr]::GetString(21791), $CurrentUserFolderLocation) -Verbose
Write-Warning -Message $Localization.FilesWontBeMoved Write-Warning -Message $Localization.FilesWontBeMoved
do do
{ {
$Choice = Show-Menu -Title "" -Menu @($Yes, $No) -Default 2 $Choice = Show-Menu -Title "" -Menu @($Yes, $Skip) -Default 2
switch ($Choice) switch ($Choice)
{ {
@ -7771,7 +7771,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
{ {
Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI Set-UserShellFolder -UserFolder Videos -FolderPath "$env:USERPROFILE\Videos" -RemoveDesktopINI
} }
$No $Skip
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose Write-Verbose -Message $Localization.Skipped -Verbose

Loading…
Cancel
Save