Skip to content

Fix 6 bugs across 7 files: NetbiosOptions copy-paste, taskbar cleanup… - #1694

Closed
Mohammad-Faiz-Cloud-Engineer wants to merge 1 commit into
Atlas-OS:mainfrom
Mohammad-Faiz-Cloud-Engineer:bugfix-only
Closed

Fix 6 bugs across 7 files: NetbiosOptions copy-paste, taskbar cleanup…#1694
Mohammad-Faiz-Cloud-Engineer wants to merge 1 commit into
Atlas-OS:mainfrom
Mohammad-Faiz-Cloud-Engineer:bugfix-only

Conversation

@Mohammad-Faiz-Cloud-Engineer

Copy link
Copy Markdown

…, IndexOf guards, curl exit codes, vssadmin stderr

TECHNICAL EXPLANATION

  1. EnableFileSharing.ps1:14 - NetbiosOptions copy-paste bug (Medium)

    • Bug: Value 2 means Disable NetBIOS; copied from DisableFileSharing.ps1
    • Fix: Changed to Value 0 (Default/Enable)
    • Impact: Enabling file sharing now actually enables NetBIOS
  2. TASKBARPINS.ps1:99-102 - 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
  3. SETPATHS.ps1:19-23 - IndexOf(-1) unguarded access (Medium)

    • Bug: Substring(-1 + marker.Length) produces corrupted paths when marker not found
    • Fix: Added if ( -ge 0) guard
    • Impact: No more corrupted registry values for unmatched paths
  4. LIBREWOLF.ps1:26,48 - Missing curl exit code check (Medium)

    • Bug: ErrorActionPreference does not apply to native EXEs; curl failures silently ignored
    • Fix: Added if (!True) { throw } after each curl download
    • Impact: Failed downloads now correctly halt the script
  5. ASSOC.ps1:204-208 - IndexOf(-1) unguarded access (Medium)

    • Bug: IndexOf with startIndex=-1 crashes on non-English Windows where search string is absent
    • Fix: Added if ( -ge 0) guard with nested bounds check
    • Impact: No more crash when Shell32.dll lacks English text
  6. CLEANUP.ps1:103 - vssadmin stderr noise (Low)

    • Bug: vssadmin prints errors to stderr when no shadow copies exist
    • Fix: Added 2> to suppress stderr
    • Impact: Cleaner output for non-critical cleanup operation
  7. packageInstall.ps1:306 - Misleading comment (Trivial)

    • Bug: Comment said 'add test cert' but it adds the real Atlas cert
    • Fix: Updated comment to 'add Atlas cert to root store'
    • Impact: Documentation accuracy

PLAIN ENGLISH EXPLANATION

  1. ENABLING FILE SHARING STILL BLOCKED FILE SHARING - The script that turns on file sharing accidentally copied a line from the 'turn off' script that still blocked sharing. Like unlocking a door but leaving the deadbolt on. Now enabling actually enables everything.

  2. TASKBAR CLEANER WAS LOOKING IN THE WRONG PLACE - When pinning browser shortcuts, the cleanup code checked 'is this a file?' when the taskbar is actually a folder. That check never worked, so it always fell through to code that throws scary red errors if the taskbar folder doesn't exist. Now it just checks 'does this exist?' and cleans up safely.

  3. PATH CORRECTION WAS CORRUPTING PATHS - A script fixes folder paths that point to wrong locations. But if the path didn't contain the text it was looking for, it would chop off the beginning and write garbage to the registry. Now it safely skips paths it can't fix.

  4. DOWNLOADS COULD SILENTLY FAIL - When downloading LibreWolf, if the internet dropped mid-download, the script wouldn't notice and would try to install a broken file. Now it checks the download worked before continuing.

  5. FILE ASSOCIATION SETUP COULD CRASH - Setting which browser opens which file type reads from a system file. On non-English Windows, that file might not have the English text it was searching for, causing the whole script to crash. Now it handles missing text gracefully.

  6. ERROR MESSAGE FROM DISK CLEANUP - A cleanup command printed scary red errors when there was nothing to clean up. Now it runs silently.

  7. A MISLEADING NOTE - A comment in the code said 'add test cert' but it was actually adding the real security certificate. Now the note says what it actually does.

…, IndexOf guards, curl exit codes, vssadmin stderr

TECHNICAL EXPLANATION
---------------------
1. EnableFileSharing.ps1:14 - NetbiosOptions copy-paste bug (Medium)
   - Bug: Value 2 means Disable NetBIOS; copied from DisableFileSharing.ps1
   - Fix: Changed to Value 0 (Default/Enable)
   - Impact: Enabling file sharing now actually enables NetBIOS

2. TASKBARPINS.ps1:99-102 - 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

3. SETPATHS.ps1:19-23 - IndexOf(-1) unguarded access (Medium)
   - Bug: Substring(-1 + marker.Length) produces corrupted paths when marker not found
   - Fix: Added if ( -ge 0) guard
   - Impact: No more corrupted registry values for unmatched paths

4. LIBREWOLF.ps1:26,48 - Missing curl exit code check (Medium)
   - Bug: ErrorActionPreference does not apply to native EXEs; curl failures silently ignored
   - Fix: Added if (!True) { throw } after each curl download
   - Impact: Failed downloads now correctly halt the script

5. ASSOC.ps1:204-208 - IndexOf(-1) unguarded access (Medium)
   - Bug: IndexOf with startIndex=-1 crashes on non-English Windows where search string is absent
   - Fix: Added if ( -ge 0) guard with nested bounds check
   - Impact: No more crash when Shell32.dll lacks English text

6. CLEANUP.ps1:103 - vssadmin stderr noise (Low)
   - Bug: vssadmin prints errors to stderr when no shadow copies exist
   - Fix: Added 2> to suppress stderr
   - Impact: Cleaner output for non-critical cleanup operation

7. packageInstall.ps1:306 - Misleading comment (Trivial)
   - Bug: Comment said 'add test cert' but it adds the real Atlas cert
   - Fix: Updated comment to 'add Atlas cert to root store'
   - Impact: Documentation accuracy

PLAIN ENGLISH EXPLANATION
-------------------------
1. ENABLING FILE SHARING STILL BLOCKED FILE SHARING - The script that turns on file sharing accidentally copied a line from the 'turn off' script that still blocked sharing. Like unlocking a door but leaving the deadbolt on. Now enabling actually enables everything.

2. TASKBAR CLEANER WAS LOOKING IN THE WRONG PLACE - When pinning browser shortcuts, the cleanup code checked 'is this a file?' when the taskbar is actually a folder. That check never worked, so it always fell through to code that throws scary red errors if the taskbar folder doesn't exist. Now it just checks 'does this exist?' and cleans up safely.

3. PATH CORRECTION WAS CORRUPTING PATHS - A script fixes folder paths that point to wrong locations. But if the path didn't contain the text it was looking for, it would chop off the beginning and write garbage to the registry. Now it safely skips paths it can't fix.

4. DOWNLOADS COULD SILENTLY FAIL - When downloading LibreWolf, if the internet dropped mid-download, the script wouldn't notice and would try to install a broken file. Now it checks the download worked before continuing.

5. FILE ASSOCIATION SETUP COULD CRASH - Setting which browser opens which file type reads from a system file. On non-English Windows, that file might not have the English text it was searching for, causing the whole script to crash. Now it handles missing text gracefully.

6. ERROR MESSAGE FROM DISK CLEANUP - A cleanup command printed scary red errors when there was nothing to clean up. Now it runs silently.

7. A MISLEADING NOTE - A comment in the code said 'add test cert' but it was actually adding the real security certificate. Now the note says what it actually does.
@github-actions github-actions Bot added the playbook Playbook related issues/PRs label Jul 30, 2026

@TheyCreeper TheyCreeper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RadNotRed RadNotRed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz make pr for new update branch instead

@Mohammad-Faiz-Cloud-Engineer

Copy link
Copy Markdown
Author

Plz make pr for new update branch instead

so should i close this pr and open a new one?

@RadNotRed

Copy link
Copy Markdown
Member

Plz make pr for new update branch instead

so should i close this pr and open a new one?

👍

@RadNotRed RadNotRed closed this Aug 1, 2026
@Mohammad-Faiz-Cloud-Engineer

Copy link
Copy Markdown
Author

i want one help, i am not getting the new-update branch when forking the repo only getting the main branch, how can i get the new-update branch?

@ItsTatsuya

Copy link
Copy Markdown

i want one help, i am not getting the new-update branch when forking the repo only getting the main branch, how can i get the new-update branch?

if u are using vscode, it shows up as a remote branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

playbook Playbook related issues/PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants