[DISCUSSION] Windows 11 Build 26x00 (PC) [24/25H2 Retail- GE-release]

Discussion in 'Windows 11' started by Enthousiast, Apr 3, 2024.

  1. Tito

    Tito Admin / Adviser
    Staff Member

    Nov 30, 2009
    19,064
    19,811
    340
    Code:
    @echo off
    setlocal enabledelayedexpansion
    chcp 65001 >nul
    
    set "input=%*"
    
    if "%input%"=="" (
        echo Usage: SetDefaultUserFolder.cmd ^<value^>
        echo Example: SetDefaultUserFolder.cmd MyFolderName
        exit /b 1
    )
    
    :: Now call PowerShell for detailed Unicode and reserved name validation
    powershell -NoProfile -Command ^
        "$name = '%input%'.Trim();" ^
        "$invalid = [System.IO.Path]::GetInvalidFileNameChars() + @('@', '.', ';', '=', ',', '+');" ^
        "if ([string]::IsNullOrWhiteSpace($name)) { Write-Host '[ERROR] Name is empty or whitespace.'; exit 1 }" ^
        "elseif ($name.Length -gt 16) { Write-Host '[ERROR] Name exceeds 16 character limit.'; exit 2 }" ^
        "elseif ($name.EndsWith(' ') -or $name.EndsWith('.')) { Write-Host '[ERROR] Name cannot end with space or dot.'; exit 1 }" ^
        "elseif ('CON','PRN','AUX','NUL','COM1','COM2','COM3','COM4','COM5','COM6','COM7','COM8','COM9','LPT1','LPT2','LPT3','LPT4','LPT5','LPT6','LPT7','LPT8','LPT9' -contains $name.ToUpper()) { Write-Host \"[ERROR] '$name' is a reserved name.\"; exit 1 }" ^
        "elseif ($invalidChar = $name.ToCharArray() | Where-Object { $invalid -contains $_ } | Select-Object -First 1) { Write-Host \"[ERROR] Invalid character found in name: '$invalidChar'\"; exit 1 }" ^
        "else { Write-Host \"[OK] '$name' is a valid folder name.\" }"
    
    if errorlevel 1 (
        echo [ERROR] Folder name validation failed in PowerShell.
        exit /b 4
    )
    
    :: Write to registry
    reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UserOOBE /v SetSAMFolderName /t REG_SZ /d "%input%" /f >nul
    if %errorlevel% EQU 0 (
        echo [SUCCESS] Default user folder set to: %input%
    ) else (
        echo [ERROR] Failed to set registry value. %errorlevel%
        exit /b 5
    )
    
    exit /b 0
    
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,000
    96,130
    340
    Why enabledelayedexpansion if you don't intend to use it? :rolleyes:
    "%input%" comparison might fail if it contains invalid characters
     
  3. BaffledSoftware

    BaffledSoftware MDL Member

    Mar 19, 2019
    123
    16
    10
    Exactly! Hence, why I asked how can one have sharp edges?

    Also, how can one have multiple town weather forecasts (live tiles) on the start menu like on W10? Is that possible on W11?
     
  4. 12 lb Turkey

    12 lb Turkey MDL Member

    Nov 24, 2022
    159
    104
    10
    Are they still allowing interns to write PS code?

    -contains
    is case-insensitive, so why bother with $name.ToUpper() ?
     
  5. maxama123

    maxama123 MDL Addicted

    Oct 22, 2009
    533
    224
    30
    Can someone confirm if the enablement package MSU safe to install on my Windows 11 24H2 to get it too "25H2"?
    Also, when is it expected to be released?

    --> "windows11.0-kb5054156-x64_a0c1638cbcf4cf33dbe9a5bef69db374b4786974.msu"
     
  6. tistou77

    tistou77 MDL Guru

    Mar 22, 2008
    2,118
    703
    90
    It's safe :)
    Already available in WU (with the appropriate option activated)
     
  7. Stimpy88

    Stimpy88 MDL Senior Member

    Mar 24, 2011
    397
    231
    10
    It's safe because it doesn't do anything. The "updates" are already installed in your system; this just enables GUI changes to catch up. It's a nothing burger.
     
  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    52,722
    117,036
    450
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. tistou77

    tistou77 MDL Guru

    Mar 22, 2008
    2,118
    703
    90
    Get the latest updates as soon as they are available

    Some didn't have it, and by enabling this option, they got it
     
  10. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    52,722
    117,036
    450
    With 25H2 it is probably the same as with previous "new" feature upgrades, newest (OEM) hardware first then older and selfbuild systems.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    52,722
    117,036
    450
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    52,722
    117,036
    450
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. boe323

    boe323 MDL Expert

    Jul 19, 2011
    1,939
    649
    60
    dream themes are disabled again ...it was nice while it lasted.
     
  14. fabricio simoes

    fabricio simoes MDL Member

    Dec 17, 2020
    237
    74
    10
    script bypass Windows 11 25H2 Dev... @abbodi1406
     
  15. egyptian hak

    egyptian hak MDL Senior Member

    Aug 21, 2009
    284
    76
    10
    Is that really ?
    Microsoft has indeed tightened the reins in Windows 11 25H2 (build 26200.2672) by enforcing the requirement for a Microsoft account (MSA) during the Out-of-Box Experience (OOBE) setup process.
    • No Local Account Option: The traditional method of bypassing MSA by disconnecting from the internet or using generic usernames like oobe\bypassnro no longer works in this build.

    • All Editions Affected: Even Windows 11 Pro, which previously allowed local account setup when offline, now enforces MSA sign-in during setup.

    • Workarounds Blocked: Microsoft has patched most known bypasses, including registry tweaks and command-line tricks during setup.

    • what about Education Edition and IOT Enterprise S?
     
  16. Stimpy88

    Stimpy88 MDL Senior Member

    Mar 24, 2011
    397
    231
    10
    Can you not still perform the Domain join option to get a local account?
     
  17. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,707
    1,714
    150
    yea you can still use domain join to get local accounts
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,534
    1,644
    60
    This is what i do :
    1. create a MSA account
    2. Open a session with MSA account and create a local account
    3. Switch to local account and delete MSA account
     
  19. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    52,722
    117,036
    450
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...