Skip to content

Commit 88ebe38

Browse files
committed
May 2025 update (2nd attemp)
Please see the change log for details
1 parent 94aae9a commit 88ebe38

File tree

29 files changed

+209
-177
lines changed

29 files changed

+209
-177
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
wsreset.exe -i

Changelog.markdown

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,65 @@
11
# Change log
22

3-
## February
3+
## May 2025
4+
5+
### New
6+
7+
- **Apps\Download and Install Microsoft Store.cmd**: After years of resisting, I finally added this simple batch file. It runs `wsreset.exe -i`, which downloads and installs the Microsoft Store app. It is useful when the Microsoft Store client is missing. I always thought I could memorize this simple command. As it turns out, there are myriads of simple commands to memorize, and this one doesn't stick to _my_ memory. And for you, dear reader, it may have educational value.
8+
9+
### Changed
10+
11+
- **All .reg files:** Unified their encoding to UTF-8. You'd think GitHub plays well with UTF-16LE, but no! This is by far the largest change this month, and the most useless one.
12+
- **Code snippets\Functions library.psm1** now has a new `Reset-PSEnvPath` function that reverts the `PATH` and `PSModulePath` environment variables to the logon-time values from the Registry, discarding any changes that the parent process has made in them. For the details in the impact of these variables, see: <https://github.com/PowerShell/PowerShell/issues/8635>.
13+
- **Shell\Wallpaper\Find current wallpaper.ps1**: Used the `new()` method instead of `New-Object`. Hopefully, this fixes the strange performance problem I'm facing.
14+
15+
### Moved
16+
17+
- `Disable dump stack logging.reg` from `System Settings` to `System Settings\Dump stack logging`
18+
- `Disable diagnostics data collection (reversible via Settings app).reg` from `System settings` to `System settings\Telemetry`
19+
- `System settings\Set firmware time as UTC.reg` from `System settings` to `System settings\UTC time`
20+
21+
## February 2025
422

523
Changed:
624

7-
- `Apps\Remove AppX packages.ps1`: Added "Outlook (new)" to list; minor superficial changes
25+
- `Apps\Remove AppX packages.ps1`: Added "Outlook (new)" to the list; minor superficial changes
826
- `Shell\Wallpaper\Find current wallpaper (Windows 7).ps1`: Fixed the version-checking code
927
- `Shell\Wallpaper\Find current wallpaper.ps1`: Fixed the version-checking code
1028

1129
## January 2025
1230

1331
### New
1432

15-
- **Hardware\Get-CpuIntrinsicsSupport.ps1**: Queries all supported CPU instruction-set extensions
16-
for x86 and x86-64 systems and reports their availability. Have you ever wondered whether your CPU
17-
supports AVX512, AVXVNNI, or X86SERIALIZE? Now you know.
33+
- **Hardware\Get-CpuIntrinsicsSupport.ps1**: Queries all supported CPU instruction-set extensions for x86 and x86-64 systems and reports their availability. Have you ever wondered whether your CPU supports AVX512, AVXVNNI, or X86SERIALIZE? Now you know.
1834

19-
- **Maintenance\Find broken Start menu LNKs.ps1**: Scans both per-user and machine-wide areas of the
20-
Start menu to find shortcuts that are potentially broken. For years, I've been adamant to include
21-
such a script in my collection because it's not perfect. Today, I gave up. Not everything in this
22-
world is perfect; the use case justifies the imperfection. I'll perfect it in time.
35+
- **Maintenance\Find broken Start menu LNKs.ps1**: Scans both per-user and machine-wide areas of the Start menu to find shortcuts that are potentially broken. For years, I've been adamant to include such a script in my collection because it's not perfect. Today, I gave up. Not everything in this world is perfect; the use case justifies the imperfection. I'll perfect it in time.
2336

2437
Dependencies:
2538

26-
- `Maintenance\WindowsShortcutFactory.1.2.0\lib\netstandard2.0\WindowsShortcutFactory.xml`
27-
- `Maintenance\WindowsShortcutFactory.1.2.0\lib\netstandard2.0\WindowsShortcutFactory.dll`
28-
- `Maintenance\WindowsShortcutFactory.1.2.0\WindowsShortcutFactory.1.2.0.nupkg`
29-
- `Maintenance\WindowsShortcutFactory.1.2.0\README.md`
30-
- `Maintenance\WindowsShortcutFactory.1.2.0\.signature.p7s`
39+
- `Maintenance\WindowsShortcutFactory.1.2.0\lib\netstandard2.0\WindowsShortcutFactory.xml`
40+
- `Maintenance\WindowsShortcutFactory.1.2.0\lib\netstandard2.0\WindowsShortcutFactory.dll`
41+
- `Maintenance\WindowsShortcutFactory.1.2.0\WindowsShortcutFactory.1.2.0.nupkg`
42+
- `Maintenance\WindowsShortcutFactory.1.2.0\README.md`
43+
- `Maintenance\WindowsShortcutFactory.1.2.0\.signature.p7s`
3144

32-
- **System settings\Disable dump stack logging.reg**: Disables creation of `DumpStack.log` and
33-
`DumpStack.log.tmp` at the root of the C: volume.
45+
- **System settings\Disable dump stack logging.reg**: Disables creation of `DumpStack.log` and `DumpStack.log.tmp` at the root of the C: volume.
3446

3547
### Changed
3648

3749
Major changes:
3850

39-
- **Maintenance\Optimize PATH variable.ps1**: Use `StringComparer` to detect duplicate paths with
40-
different casing. Windows file systems are case-aware, case-insensitive.
51+
- **Maintenance\Optimize PATH variable.ps1**: Use `StringComparer` to detect duplicate paths with different casing. Windows file systems are case-aware, case-insensitive.
4152

4253
Minor changes:
4354

44-
- **Apps\Reinstall AppX Packages.ps1:** Add `Appx` module check
55+
- **Apps\Reinstall AppX Packages.ps1:** Add `Appx` module check
4556
- **Apps\Repair system AppX packages.ps1**: Add `Appx` module check
46-
- **BITS modules**: They consist of "BITS\Get active BITS jobs, detailed.ps1", "BITS\Get active BITS
47-
jobs, table.ps1", "BITS\Get all BITS jobs, custom.ps1", "BITS\Get pending BITS jobs,
48-
detailed.ps1", and "BITS\Get pending BITS jobs, table.ps1". They've seen the following changes:
49-
- Add detailed help text
50-
- Add `BitsTransfer` module check
51-
- Add PowerShell version check
52-
- **Code snippets\PS1 template.ps1**: The `#Requires -Version 5.1` statement goes to the top, in
53-
preparation for developing test adapters. Now, test adapters can read the first line of the script
54-
to find out which PowerShell version the script targets.
55-
- **Maintenance\Compile PowerShell native images.bat**: Remove the pause for user input. This
56-
functionality is now a part of Windows Terminal.
57+
- **BITS modules**: They consist of "BITS\Get active BITS jobs, detailed.ps1", "BITS\Get active BITS jobs, table.ps1", "BITS\Get all BITS jobs, custom.ps1", "BITS\Get pending BITS jobs, detailed.ps1", and "BITS\Get pending BITS jobs, table.ps1". They've seen the following changes:
58+
- Add detailed help text
59+
- Add `BitsTransfer` module check
60+
- Add PowerShell version check
61+
- **Code snippets\PS1 template.ps1**: The `#Requires -Version 5.1` statement goes to the top, in preparation for developing test adapters. Now, test adapters can read the first line of the script to find out which PowerShell version the script targets.
62+
- **Maintenance\Compile PowerShell native images.bat**: Remove the pause for user input. This functionality is now a part of Windows Terminal.
5763

5864
Rewrote their help texts:
5965

@@ -231,20 +237,20 @@ Changed:
231237
New:
232238

233239
- **Shell**: There are now three new `.reg` files that fix the `.ps1` file association in Microsoft Windows. Consult with the readme file about what they do.
234-
- `Fix 'Run with PowerShell' verb (PowerShell 7).reg`
235-
- `Fix 'Run with PowerShell' verb (Windows 10).reg`
236-
- `Fix 'Run with PowerShell' verb (Visual Studio Code - System).reg`
240+
- `Fix 'Run with PowerShell' verb (PowerShell 7).reg`
241+
- `Fix 'Run with PowerShell' verb (Windows 10).reg`
242+
- `Fix 'Run with PowerShell' verb (Visual Studio Code - System).reg`
237243
- **Code snippets\PS1 template.ps1** used as a template for creating new `.ps1` files.
238244
- **Demos\Pipeline-ready function.ps1** demonstrates the peculiarities of creating pipeline-ready functions.
239-
- **Unicode test suite\Text file.markdown** is UTF-16 LE text file that contains text in 12 different languages. Only very good text editors can show them all correctly.
245+
- **Unicode test suite\Text file.markdown** is UTF-16 LE text file that contains text in 12 different languages. Only very good text editors can show them all correctly.
240246

241247
Changed:
242248

243249
- **Many name changes.** I've renamed many of the scripts, as part of adopting the following coding guidelines:
244-
- `.ps1` files will have natural English names, preferably starting with an imperative verb.
245-
- `.ps1` files will contain scripts that are expected to run interactively. `Write-Host` is allowed.
246-
- Fully automated scripts, from now on, go into `.psm1` modules and will have cmdlet names compliant with PowerShell verb-noun standards.
247-
- `.ps1` files will not have a `pause` command. This was a fragile approach. The duty of keeping the PowerShell window open for the user to see the output is now with the operating system shell.
250+
- `.ps1` files will have natural English names, preferably starting with an imperative verb.
251+
- `.ps1` files will contain scripts that are expected to run interactively. `Write-Host` is allowed.
252+
- Fully automated scripts, from now on, go into `.psm1` modules and will have cmdlet names compliant with PowerShell verb-noun standards.
253+
- `.ps1` files will not have a `pause` command. This was a fragile approach. The duty of keeping the PowerShell window open for the user to see the output is now with the operating system shell.
248254
- **Code snippets\Functions library.psm1** now passes PSScriptAnalyzer tests.
249255
- **Demos\ANSI escape sequences.ps1** now passes PSScriptAnalyzer tests.
250256

Code snippets/Functions library.psm1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,17 @@ function Exit-BecauseFileIsMissing {
230230
)
231231
)
232232
}
233+
234+
function Reset-PSEnvPath {
235+
<#
236+
.SYNOPSIS
237+
Reverts the PATH and PSModulePath environment variables to the logon-time values from Registry.
238+
.DESCRIPTION
239+
Reverts the PATH and PSModulePath environment variables to the logon-time values from Registry,
240+
discarding any changes that the parent process has made in them. For the details in the impact
241+
of these variables, see:
242+
<https://github.com/PowerShell/PowerShell/issues/8635>
243+
#>
244+
$env:PATH = $([Environment]::GetEnvironmentVariable('PATH', 'Machine')) +';'+$([Environment]::GetEnvironmentVariable('PATH', 'User'))
245+
$env:PSModulePath = [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine')
246+
}

0 commit comments

Comments
 (0)