Fix 7 bugs across 5 files: HKCU propagation, uninstall warning, EKU … - #1693
Closed
Mohammad-Faiz-Cloud-Engineer wants to merge 1 commit into
Closed
Fix 7 bugs across 5 files: HKCU propagation, uninstall warning, EKU …#1693Mohammad-Faiz-Cloud-Engineer wants to merge 1 commit into
Mohammad-Faiz-Cloud-Engineer wants to merge 1 commit into
Conversation
…validation, taskbar cleanup, ARM64 detection TECHNICAL EXPLANATION --------------------- 1. APPLYDUHIVE.ps1:16 - HKCU default user propagation (Critical) - Bug: -like 'HKCU' performs exact string match - Fix: Changed to -like 'HKCU*' so all HKCU paths are correctly matched - Impact: Previously 0% of HKCU registry tweaks were inherited by new users 2. packageInstall.ps1:181-182 - Wrong variable in uninstall warning (Medium) - Bug: Used $notMatchedPackages (undefined at that point) instead of $notInstalledPackages (defined on line 166) - Fix: Changed both references to $notInstalledPackages - Impact: Warning about unmatched uninstall packages was silently suppressed 3. packageInstall.ps1:300 - EKU certificate validation (Medium) - Bug: -ne on array returns non-matching elements; certs with multiple EKUs were incorrectly rejected - Fix: Changed to -notcontains which correctly tests collection membership - Impact: Valid multi-EKU certificates no longer falsely rejected 4. taskbarPins.ps1:108-114 - Dead code and error on missing path (Low) - Bug: Test-Path -PathType Leaf checks if path is a FILE; TaskBar is a DIRECTORY - Fix: Replaced with simple Test-Path + Remove-Item wildcard - Impact: No more cosmetic red errors when TaskBar dir doesn't exist 5-7. packageInstall.ps1:29, SOFTWARE.ps1:16, CLIENTCBS.ps1:12 - ARM64 detection (Low) - Bug: 32-bit PowerShell on ARM64 sees PROCESSOR_ARCHITECTURE=x86, not ARM64 - Fix: Added PROCESSOR_ARCHITEW6432 fallback - Impact: ARM64 correctly detected in WOW64 processes when CIM query fails PLAIN ENGLISH EXPLANATION ------------------------- 1. NEW USERS WERE MISSING YOUR SETTINGS - The script that copies your personalization tweaks to new user accounts had a typo. It was looking for an exact match when it should have been looking for anything starting with 'HKCU'. This meant none of your settings were ever applied to new users. Every new person had to start from scratch. Now it works. 2. A WARNING THAT COULDN'T SPEAK - When the installer couldn't find a Windows component to remove, it was supposed to warn you. But it referenced the wrong variable name, so the warning was silently swallowed. You'd never know something failed. Now it tells you. 3. VALID CERTIFICATES WERE BEING REJECTED - The code that verifies component-removal packages checked incorrectly. If a certificate had multiple purposes listed, it would wrongly reject it even if the correct purpose was there. Now it correctly accepts valid certs. 4. TASKBAR CLEANER WAS LOOKING IN THE WRONG PLACE - When pinning browser shortcuts, the old code checked 'is this a file?' when the taskbar is actually a folder. This never worked, so it always fell through to a backup method that would throw scary red errors if the taskbar folder didn't exist. Now it just checks 'does this exist?' and cleans up properly. 5-7. ARM64 CHIP DETECTION WAS INCOMPLETE - Three places in the code try to detect ARM64 processors. On some systems where PowerShell runs in compatibility mode, the architecture wasn't being detected at all. Added a fallback check so ARM64 systems are always correctly identified.
Mohammad-Faiz-Cloud-Engineer
requested review from
RadNotRed and
Xyueta
as code owners
July 30, 2026 20:47
Mohammad-Faiz-Cloud-Engineer
force-pushed
the
main
branch
from
July 30, 2026 21:20
feaa819 to
98d997d
Compare
RadNotRed
approved these changes
Aug 1, 2026
RadNotRed
self-requested a review
August 1, 2026 16:46
RadNotRed
requested changes
Aug 1, 2026
RadNotRed
left a comment
Member
There was a problem hiding this comment.
Plz make pr for new-update branch instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…validation, taskbar cleanup, ARM64 detection
TECHNICAL EXPLANATION
APPLYDUHIVE.ps1:16 - HKCU default user propagation (Critical)
packageInstall.ps1:181-182 - Wrong variable in uninstall warning (Medium)
packageInstall.ps1:300 - EKU certificate validation (Medium)
taskbarPins.ps1:108-114 - Dead code and error on missing path (Low)
5-7. packageInstall.ps1:29, SOFTWARE.ps1:16, CLIENTCBS.ps1:12 - ARM64 detection (Low)
PLAIN ENGLISH EXPLANATION
NEW USERS WERE MISSING YOUR SETTINGS - The script that copies your personalization tweaks to new user accounts had a typo. It was looking for an exact match when it should have been looking for anything starting with 'HKCU'. This meant none of your settings were ever applied to new users. Every new person had to start from scratch. Now it works.
A WARNING THAT COULDN'T SPEAK - When the installer couldn't find a Windows component to remove, it was supposed to warn you. But it referenced the wrong variable name, so the warning was silently swallowed. You'd never know something failed. Now it tells you.
VALID CERTIFICATES WERE BEING REJECTED - The code that verifies component-removal packages checked incorrectly. If a certificate had multiple purposes listed, it would wrongly reject it even if the correct purpose was there. Now it correctly accepts valid certs.
TASKBAR CLEANER WAS LOOKING IN THE WRONG PLACE - When pinning browser shortcuts, the old code checked 'is this a file?' when the taskbar is actually a folder. This never worked, so it always fell through to a backup method that would throw scary red errors if the taskbar folder didn't exist. Now it just checks 'does this exist?' and cleans up properly.
5-7. ARM64 CHIP DETECTION WAS INCOMPLETE - Three places in the code try to detect ARM64 processors. On some systems where PowerShell runs in compatibility mode, the architecture wasn't being detected at all. Added a fallback check so ARM64 systems are always correctly identified.