1. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    If the HostBuild is less than 1903 then it will use the ReleaseId value and if it is greater than and equal to 1903 it will use DisplayVersion.

    or you can change it like this

    Code:
    if "%HostBuild%" leq "1809" (
        for /f "tokens=3 delims= " %%k in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ReleaseId" ^| find "REG_SZ"') do (set HostDisplayVersion=%%k)
    )
    if "%HostBuild%" geq "1903" (
        for /f "tokens=3 delims= " %%k in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion" ^| find "REG_SZ"') do (set HostDisplayVersion=%%k)
    )
    

    For Manual Setup removal both will work but have chosen the default index.

    For renaming you need the current directory to be the parent of the directory you are renaming otherwise it won't work that's why used the move which does the same function.


     
  2. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Will checkout.

     
  3. Titanos

    Titanos MDL Novice

    Dec 11, 2019
    31
    28
    0
    #20863 Titanos, Oct 16, 2021
    Last edited: Oct 18, 2021
    I was right.
    Replace CurrentControlSet with ControlSet001.

    Code:
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
    "fDenyTSConnections"=dword:00000001
    "updateRDStatus"=dword:00000000
    
    [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SCMConfig]
    "EnableSvchostMitigationPolicy"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters]
    "MaxNegativeCacheTtl"=dword:00000000
    "NegativeCacheTime"=dword:00000000
    "NetFailureCacheTime"=dword:00000000
    "NegativeSOACacheTime"=dword:00000000
    

    Advice: don't play with DNSCache parameters. Here are some tweaks if you really need some:
    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile]
    "NetworkThrottlingIndex"=dword:00000005
    
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters]
    "DisableTaskOffload"=dword:00000001
    "EnableDCA"=dword:00000001
    "EnableDeadGWDetect"=dword:00000001
    "EnableTCPA"=dword:00000001
    "EnableWSD"=dword:00000000
    "KeepAliveInterval"=dword:000007d0
    "KeepAliveTime"=dword:00493e0
    "MaxHashTableSize"=dword:0000ffdc
    "MaxUserPort"=dword:0000ffdc
    "StrictTimeWaitSeqCheck"=dword:00000001
    "SynAttackProtect"=dword:00000001
    "Tcp1323Opts"=dword:00000001
    "TcpMaxConnectResponseRetransmissions"=dword:00000003
    "TcpMaxDataRetransmissions"=dword:00000003
    "TcpTimedWaitDelay"=dword:0000001e
    
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\ServiceProvider]
    "LocalPriority"=dword:0000000a
    "HostsPriority"=dword:0000000b
    "DnsPriority"=dword:0000000c
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters]
    "TCPNoDelay"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Dnscache\Parameters]
    "MaxCacheTtl"=dword:00005460
    "MaxCacheEntryTtlLimit"=dword:00005460
    "MaxSOACacheEntryTtlLimit"=dword:00000005
    
    
     
  4. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    341
    474
    10
  5. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    #20865 inTerActionVRI, Oct 16, 2021
    Last edited: Oct 17, 2021
    No. You do not have to change anything, in that sense. I just wanted to understand if you were using the Build ID or ReleaseId.

    However, for branch id will be a problematic to detect geq 1903, as it will appear 20h1, 21h1, etc and will not work. It would have to be something like lss 19041 geq 19041 to stay OK.

    and the previous way would have to be
    leq 1909
    gtr 1909
    Because in Build 18363 there is also no "DisplayVersion" registry entry.

    or
    lss 2004
    geq 2004 But above that, I suppose will give the problem described above 20h1, 21h1, etc.


    Maybe I'm very mistaken.


    EDIT:
    I got home now and went to test.
    Code:
    HostOSName                          : Microsoft Windows 10 Pro
    HostEdition                         : Professional
    HostBuildBranch (BuildBranch)       : 19h1_release
    HostReleaseVersion (ReleaseId)      : 1909
    HostDisplayVersion (ReleaseId)      : 1909
    ERRO: O sistema não pôde localizar a chave do Registro ou valor especificado.
    HostDisplayVersion (DisplayVersion) : 1909
    HostVersion                         : 10.0
    HostBuild                           : 18363
    HostServicePackBuild                : 1854
    HostInstallationType                : Client
    HostArchitecture                    : x64
    HostLanguage                        : pt-BR
    
    Note: "Error: The system could not find the registry key or specified value." For DisplayVersion value.
    Then HostDisplayVersion is sets like HostReleaseVersion.
    To correct the error I just put the following condition:
    if "%HostDisplayVersion%" equ ""
    I could have used the ">nul"

    Code:
    for /f "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f "ReleaseId" ^| find "REG_SZ"') do (set HostReleaseVersion=%%j & if "%%j" lss "2004" set HostDisplayVersion=%%j)
    if "%HostDisplayVersion%" equ "" for /f "tokens=3 delims= " %%k in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion" ^| find "REG_SZ"') do (set HostDisplayVersion=%%k)
    
    Code:
    HostOSName                          : Microsoft Windows 10 Pro
    HostEdition                         : Professional
    HostBuildBranch (BuildBranch)       : vb_release
    HostReleaseVersion (ReleaseId)      : 2009
    HostDisplayVersion (ReleaseId)      :
    HostDisplayVersion (DisplayVersion) : 21H2
    HostVersion                         : 10.0
    HostBuild                           : 19044
    HostServicePackBuild                : 1288
    HostInstallationType                : Client
    HostArchitecture                    : x64
    HostLanguage                        : pt-BR
    
    I believe I was wrong. Strings 20h1, 20h2, 21h1, etc. are only in Reg Query for "DisplayVersion" value. In case you use it for the "ReleaseId" value everything is right.

    So I put the commands in the order, in which it was displayed on screen in my test.
    And it was like this:
    Code:
    :: Setting Host OS version, architecture and language variables
    set HostOSName=
    set HostEdition=
    set HostBuildBranch=
    set HostReleaseBranch=
    set HostDisplayVersion=
    set HostVersion=
    set HostBuild=
    set HostServicePackBuild=
    set HostInstallationType=
    set HostArchitecture=
    set HostLanguage=
    
    for /f "tokens=1 delims=" %%p in ('wmic os get Caption ^| find /v "Caption"') do (for /f "delims=" %%b in ("%%p") do (set "HostOSName=%%~nb"))
    for /f "tokens=3 delims= " %%l in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID" ^| find "REG_SZ"') do (set "HostEdition=%%l")
    for /f "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "BuildBranch" ^| find "REG_SZ"') do (set HostBuildBranch=%%j)
    for /f "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f "ReleaseId" ^| find "REG_SZ"') do (set /A HostReleaseVersion=%%j & if "%%j" lss "2004" set /A HostDisplayVersion=%%j)
    if "%HostDisplayVersion%" equ "" for /f "tokens=3 delims= " %%k in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion" ^| find "REG_SZ"') do (set HostDisplayVersion=%%k)
    for /f "tokens=4-5 delims=. " %%s in ('ver 2^>nul') do (set "HostVersion=%%s.%%t")
    for /f "tokens=1 delims=" %%i in ('wmic os get BuildNumber ^| find /v "BuildNumber"') do (for /f "delims=" %%b in ("%%i") do (set /a HostBuild=%%~nb))
    for /f "tokens=3 delims= " %%r in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "UBR" ^| find "REG_DWORD"') do (set /a HostServicePackBuild=%%r)
    for /f "tokens=3 delims= " %%m in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "InstallationType" ^| find "REG_SZ"') do (set HostInstallationType=%%m)
    if exist "%SystemROOT%\SysWOW64" (set "HostArchitecture=x64") else (set "HostArchitecture=x86")
    rem for /f "tokens=6 delims= " %%o in ('DISM /Online /English /Get-Intl ^| findstr /i /C:"Default system UI language"') do (set "HostLanguage=%%o")
    for /f "tokens=3 delims= " %%o in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\CommonGlobUserSettings\Control Panel\International" /v "LocaleName" ^| find "REG_SZ"') do (set "HostLanguage=%%o")
    
    Note: I preferred HostOSName through wmic. But I do not know if it's right in Windows 11.

    Code:
    echo.Reading Host OS Information...
    echo.
    if "%HostBuild%" lss "19041" (
       echo.%HostOSName% ^(%HostDisplayVersion%^) - v%HostVersion%.%HostBuild%.%HostServicePackBuild% %HostArchitecture% %HostLanguage%
    ) else (
       echo.%HostOSName% ^(%HostReleaseVersion% %HostDisplayVersion%^) - v%HostVersion%.%HostBuild%.%HostServicePackBuild% %HostArchitecture% %HostLanguage%
    )
    

    That way I had put it before it was only a palliative for that moment.
    This way:
    Code:
    rem for /f "tokens=3*" %%p in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ProductName" ^| find "ProductName"') do (if "%HostBuild%" lss "21996" (set "HostOSName=%%p %%q") else (set "HostOSName=%%p 11"))
    
     
  6. DennyAmaro

    DennyAmaro MDL Junior Member

    Apr 25, 2018
    63
    21
    0
    Yes, I put each app to the file so this will prevent apps to return when install an update.
     
  7. DennyAmaro

    DennyAmaro MDL Junior Member

    Apr 25, 2018
    63
    21
    0
    Will do this, thank you.
     
  8. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Have uploaded Toolkit.cmd with quick fix for importing registry settings from registry file would skip renaming the key

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\

    to

    HKEY_LOCAL_MACHINE\TK_SYSTEM\ControlSet001\

    Now the Registry file is converted twice to fix the CurrentControlSet to ControlSet001.
     
  9. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    341
    474
    10
  10. Zanza-kun

    Zanza-kun MDL Junior Member

    May 28, 2012
    87
    15
    0
    I noticed that when you delete the Notepad on Windows 11, it is still there but you lose all the associations, I thought it would be the opposite.
     
  11. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    341
    474
    10
  12. Feartamixg

    Feartamixg MDL Addicted

    May 15, 2016
    766
    612
    30
    @MSMG
    I realise the current ToolKitHelper.exe is documented for use with 1904X.1266, but is it safe to use with 19043.1288 or should I wait a little longer for next release?

    Also hoping this arrives soon, but I understand that it is very likely that you are extremely busy just now.
     
  13. MIMMO61

    MIMMO61 MDL Senior Member

    Aug 19, 2009
    356
    106
    10
    Good morning.
    Unfortunately I have to delay my tests with W11 at VirtualBox's home that does not accept W11 ISOs due to TPM2.0.
    I hope Oracle resolves the problem.
     
  14. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    341
    474
    10
    #20876 graver.x, Oct 19, 2021
    Last edited: Oct 19, 2021
    But there are ways around the new requirements. Why not use it?
    For example, take Win 10 ISO and replace Win 10 install.wim in it with Win 11 install.wim
    And if you just wait for something, then you can not wait for anything... after all, the problem inconveniences not Oracle, but you. We need to help ourselves somehow. ;)
     
  15. Feartamixg

    Feartamixg MDL Addicted

    May 15, 2016
    766
    612
    30
    I use a registry file to bypass these checks and keep this file on a USB drive. When I need to install Windows 11, I simply attach the USB drive to the machine and it is immediately seen by the installer. I then open a command prompt window (Shift + F10) and type in D:\Bypass.reg which simply imports the registry bypass file into the installer.

    Have attached the Bypass.reg file which I use and I hope can help you.
     

    Attached Files:

  16. rorewe4314

    rorewe4314 MDL Member

    Jun 18, 2020
    107
    22
    10
    MSMG, Do I need to apply registry tweaks to Windows 10 Enterprise LTSC to disable Cortana?
     
  17. MIMMO61

    MIMMO61 MDL Senior Member

    Aug 19, 2009
    356
    106
    10
    I thank you
    It's possible Insert this registry key into the W11 ISO?
     
  18. rorewe4314

    rorewe4314 MDL Member

    Jun 18, 2020
    107
    22
    10
    MSMG, I was unable to disable the Windows Firewall with your registry tweak; and the registry itself does not have your tweak.

    What to do?

    Code:
    if "%Tweak%" equ "DisableWindowsFirewall" Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v "DisableFirewall" /t REG_SZ /d "%%windir%%\System32\netsh.exe advfirewall set allprofiles state off" /f >nul 2>&1