1. n3ro97

    n3ro97 MDL Member

    Oct 17, 2018
    105
    63
    10
    @MSMG
    Toolkit.cmd wrong registry key spelling/typo in Disable Windows Update tweak. Remove closing square bracket "]".

    Change:
    Code:
    if "%Tweak%" equ "DisableWindowsUpdate"
    (
    Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-WindowsUpdateClient/Operational]" /v "Enabled" /t REG_DWORD /d "0" /f >nul 2>&1
    )
    To:
    Code:
    if "%Tweak%" equ "DisableWindowsUpdate"
    (
    Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-WindowsUpdateClient/Operational" /v "Enabled" /t REG_DWORD /d "0" /f >nul 2>&1
    )
     
  2. dotMDLF

    dotMDLF MDL Novice

    Jul 20, 2015
    5
    9
    0
    #24662 dotMDLF, Feb 11, 2023
    Last edited: Feb 22, 2023
    Information: script is outdated, new one coming soon


    Hello @MSMG,

    Since there is no error-free ConvertReg.ps1 yet, here is my simple script.

    Code:
    Write-Host "#     POWERSHELL:" ([string]$PsVersionTable.PSVersion)
    
    [hashtable]$equivalents = @{
       "HKEY_CLASSES_ROOT"                                 = "HKEY_LOCAL_MACHINE\TK_SOFTWARE\Classes"
       "HKEY_LOCAL_MACHINE\\SOFTWARE"                      = "HKEY_LOCAL_MACHINE\TK_SOFTWARE"
       "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet"     = "HKEY_LOCAL_MACHINE\TK_SYSTEM\ControlSet001"
       "HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet\d\d\d"      = "HKEY_LOCAL_MACHINE\TK_SYSTEM\ControlSet001"
       "HKEY_LOCAL_MACHINE\\SYSTEM"                        = "HKEY_LOCAL_MACHINE\TK_SYSTEM"
       "HKEY_USERS\\\.DEFAULT"                             = "HKEY_LOCAL_MACHINE\TK_DEFAULT"
       "HKEY_CURRENT_USER"                                 = "HKEY_LOCAL_MACHINE\TK_NTUSER"
       "HKEY_LOCAL_MACHINE\\TK_SYSTEM\\CurrentControlSet"  = "HKEY_LOCAL_MACHINE\TK_SYSTEM\ControlSet001"
       "HKEY_LOCAL_MACHINE\\TK_SYSTEM\\ControlSet\d\d\d"   = "HKEY_LOCAL_MACHINE\TK_SYSTEM\ControlSet001"
    }
    
    if($Args.length -ne 2){
            Write-Host "ERROR PARSING PARAMETERS" -ForegroundColor Red
            Exit 1
    }
    
    $SourceDir = [System.IO.Path]::GetFullPath($Args[0]);
    if(![System.IO.Directory]::Exists($SourceDir)){
            Write-Host "ERROR NOTEXIST SOURCEDIR:" """$SourceDir""" -ForegroundColor Red
            Exit 1
    }
    Write-Host "#      SOURCEDIR:" """$SourceDir"""
    
    $TargetDir = [System.IO.Path]::GetFullPath($Args[1]);
    if(![System.IO.Directory]::Exists($TargetDir)){
            Write-Host "ERROR NOTEXIST TARGETDIR:" """$TargetDir""" -ForegroundColor Red
            Exit 1
    }
    
    Write-Host "#      TARGETDIR:" """$TargetDir"""
    
    $SourceFiles = Get-ChildItem -Path ($SourceDir+"\*") -File -Include "*.reg" #-Force #inc HIDDEN FILES
    if($SourceFiles.Count -eq 0){
        Write-Host "ERROR NO REGFILES FOUND:" """$SourceDir""" -ForegroundColor Red
        exit 1
    }
    
    Write-Host "-------------------------------------------------------------------------------------------------------------"
    foreach ($SourceFile in $SourceFiles) {
        try {
            Write-Host "#        REGFILE:" """$SourceFile"""
            $TargetFile = $TargetDir+"\"+$SourceFile.Name
           
            $SourceTXT = Get-Content $SourceFile -Raw
            foreach($Key in $equivalents.Keys | sort -Descending ) {
                $SourceTXT=([regex]::Replace($SourceTXT,"(?mi)"+$Key,$equivalents[$Key] ))
            }
    
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)(^\s{2,}$)","`n"))                    # Multi White-Space Line  > Newline
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)^(;.*)$","`n"))                    # Comment Line > Newline
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)(\r\n)","`n"))                        # CarriageReturn + NewLine > NewLine
    
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)(\n{2,})","`n"))                    # Multi Newline > Newline
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)(^\[)","`n["))                        # [ > Newline + [
            $SourceTXT=([regex]::Replace($SourceTXT,"(?m)(\n)","`r`n"))                        # NewLine > CarriageReturn + NewLine
    
            Set-Content -Path $TargetFile -Value $SourceTXT -Encoding Unicode
        }
        Catch{
            Write-Host "ERROR PROCESSING:" """$SourceFile""" -ForegroundColor Red
        }
    }
    Write-Host "-------------------------------------------------------------------------------------------------------------"
    Write-Host "EVERYTHING RIGHT? HAVE A NICE DAY :)"
    Start-Sleep 4
    exit 0
    
    ----------------------------------------------------------------------------------------------------------------------------------------


    Running: PowerShell.exe -Executionpolicy Bypass -File "ConvertSimpleREG.ps1"
    # POWERSHELL: 3.0
    ERROR PARSING PARAMETERS


    Running: PowerShell.exe -Executionpolicy Bypass -File "ConvertSimpleREG.ps1" "SOURCEDIR" "TARGETDIR_NOTEXIST"
    # POWERSHELL: 3.0
    # SOURCEDIR: "***\MYDIGITALLIFE\SOURCEDIR"
    ERROR NOTEXIST TARGETDIR: "***\MYDIGITALLIFE\TARGET_NOTEXIST"


    Running: PowerShell.exe -Executionpolicy Bypass -File "ConvertSimpleREG.ps1" "SOURCEDIR" "TARGETDIR"
    # POWERSHELL: 3.0
    # SOURCEDIR: "***\MYDIGITALLIFE\SOURCEDIR"
    # TARGETDIR: "***\MYDIGITALLIFE\TARGET_POWERSHELL"
    -------------------------------------------------------------------------------------------------------------
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\ERROR_DUPLICATE.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\ERROR_NULLFILE.reg"
    ERROR PROCESSING: "***\MYDIGITALLIFE\SOURCEDIR\ERROR_NULLFILE.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\ERROR_REGPATH.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\OK_EXPORT.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\TEST_MIXED.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\TEST_SIMPLE.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\TK_SOFTWARE_7FA53761D8D11863495A5C876AE18C23_ANSI.reg"
    # REGFILE: "***\MYDIGITALLIFE\SOURCEDIR\WARNING_REGEDIT4.reg"
    -------------------------------------------------------------------------------------------------------------
    EVERYTHING RIGHT? HAVE A NICE DAY :)



    ----------------------------------------------------------------------------------------------------------------------------------------

    Thoughts and Problems:
    There are two registry formats in Windows.
    * REGEDIT4 in ANSI encoding
    * Windows Registry Editor Version 5.00 in Unicode BOM ( no ANSI, UTF8 or other variants )

    I'm all for using only properly formatted registry files.

    But what happens if the user uses "corrupt", missorted .... registry files?

    ERROR_DUPLICATE.reg :
    [HKEY_CURRENT_USER\Software\Sysinternals]
    "EulaAccepted"=dword:00000001
    ************************
    ; Double DataItemName and OTHER DataValue
    [HKEY_CURRENT_USER\SOFTWARE\Sysinternals]
    "EulaAccepted"=dword:00000000
     
  3. amnester

    amnester MDL Junior Member

    Nov 9, 2018
    72
    18
    0
    Didn't check. I immediately created a StartIsBack folder in Program Files x86. He threw the "medicine" into her. And then I integrated the StartIsBack package itself.
     
  4. catosis

    catosis MDL Junior Member

    Apr 24, 2022
    87
    23
    0
    You do know every 3rd-party package is integrated differently? This one appears to include Windows Policy Definition. I don't use English version of Windows and there's one admx file, I don't know if I should copy it to both en-US and in my case pl-PL? On my live system there's lots of files in my language folder, and only 2 in en-US, on this computer I've got untouched Windows, so I guess they came with the system?

    And there is no 'medicine', at least none that I've seen before. Start*Back is 'cured' by at least 5 different 'doctors' and they all modify one dll file that goes to local appdata fodler.
     
  5. amnester

    amnester MDL Junior Member

    Nov 9, 2018
    72
    18
    0
    #24665 amnester, Feb 12, 2023
    Last edited: Feb 12, 2023
    Check out all options! And determine the best for yourself? Good luck!
     
  6. amnester

    amnester MDL Junior Member

    Nov 9, 2018
    72
    18
    0
    Google Translate:
    I do it like this:
    On my working machine, where StartIsBack is already installed and configured, I export my data (settings) from the registry along the path:
    [HKEY_CURRENT_USER\SOFTWARE\StartIsBack]
    Next, in the StartIsBack_w10_x64.reg file, I change it to my data in the branches:
    [HKEY_LOCAL_MACHINE\TK_NTUSER\SOFTWARE\StartIsBack]
    [HKEY_LOCAL_MACHINE\TK_NTUSER\SOFTWARE\StartIsBack\Cache]
    [HKEY_LOCAL_MACHINE\TK_NTUSER\SOFTWARE\StartIsBack\ShutdownChoices]
    from .reg file (HKEY_CURRENT_USER\SOFTWARE\StartIsBack)
    I save.
    Then the files StartIsBack_w10.tpk; I drop StartIsBack_w10_x64.reg into the Packs\Firefox folder and change their name to Firefox_w10.tpk; Firefox_w10_x64.reg
    Next, I integrate the StartIsBack package under the guise of Firefox) into MSMG Toolkit v.13.2
    After integrating the package, I go to the Mount\\Install\1\Program Files x86\StartIsBack folder and drop my additions into the Orbs folders; Styles and "cure" (msimg32.dll + change UpdateCheck.exe to a dummy)
    All ! After installing Windows 10, you have: activated StartIsBack with your settings!
    Good luck!
     
  7. smurfingtheweb77

    smurfingtheweb77 MDL Novice

    Feb 11, 2023
    4
    1
    0
    #24667 smurfingtheweb77, Feb 13, 2023
    Last edited: Feb 13, 2023
    Hello Im new to using Msmg toolkit and Im pulling my hair out trying to get the remove function to work. Everytime I go and select what I want removed and hit "2" to remove the components it gives me a access is denied error(or just recently a failed to start application error). I have tried for 3 days trying to get it working but nothing I do sticks. I have followed every guide I could find but none of them mentions the problem I'm having. I gone thru at least 100 different pages on this thread but I cant find a solution.

    Here is everything I have tried.

    • Downloaded and used versions v13.2.7 and v12.4.7
    • Used the latest ISO from microsoft media creation tool and tried a older windows 10 iso from archive.org
    • tried mounting and not mounting setup boot image and windows recovery image
    • changed security permissions for all files in toolkit to "everyone".
    • made sure their are no spaces in toolkit folder name.
    • ran "start.cmd" and "toolkit.cmd" as admin and ran them thru Nsudo.exe
    • EDIT: Thank you for the responses guys. I am running everything with elevated privilege's(Administrator). Thats the issue though, its still saying access denied.
    • disabled all security with my antivirus and windows firewall.
    • unmounted all mountpoints multiple times and restarted my pc everytime after.
    • integrated most of the packs from the official website download mirror
    • deleted both toolkit versions and restarted from scratch.
    • tried mounting windows 10 home and windows 10 pro
    • downloaded Visual c++ 2015-2022 x86 and x64
    • I'm sleep deprived from staying up late and trying a bunch of different combinations of things that there is more that i've done but I cant remember right now.
    • I'm stressing out because I am driving to two friends houses to help them build their first pc and I need to get this done before I leave
    Any advice would be greatly appreciated

    ===============================================================================
    MSMG ToolKit - Removing Windows Components
    ===============================================================================

    -------------------------------------------------------------------------------
    ####Starting Removing Windows Components#######################################
    -------------------------------------------------------------------------------

    Image : Install.wim
    Image Index : 1
    Image Architecture : x64
    Image Version : 10.0.19041.2006.0

    -------------------------------------------------------------------------------
    ####Removing Windows Components################################################
    -------------------------------------------------------------------------------

    ===========================[Install.wim, Index : 1]============================

    Access is denied.
    -------------------------------------------------------------------------------
    ####Finished Removing Windows Components#######################################
    -------------------------------------------------------------------------------

    ===============================================================================

    Press any key to continue . . .
     
  8. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,894
    10,735
    240
    ^
    hi you need run this script as Administrator when clicking in start cmd and more you also need verify if you unblock before start job
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    886
    385
    30
    Script is configured to run with Trusted Installer privileges, that's the highest level of access PC has. But you still have to run Start.cmd elevated. If I were you, first thing I would do is to make sure nothing else, any other programs except for toolkit is trying to access the mount directory. Turn off My Anti-Virus and if nothing has worked, would try it on another host system.

    Good luck.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Gibral

    Gibral MDL Junior Member

    Jan 11, 2023
    92
    3
    0
    put MSMG folder in C:/
     
  11. smurfingtheweb77

    smurfingtheweb77 MDL Novice

    Feb 11, 2023
    4
    1
    0
    I have been running everything with administrator. what does it mean to "verify to unblock"? Maybe thats the issue
     
  12. kokos76

    kokos76 MDL Novice

    Sep 27, 2015
    10
    1
    0
    @MSMG
    I found two typos. There is an extra symbol ] :
    Code:
    19447 Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-WindowsUpdateClient/Operational]" /v "Enabled" /t REG_DWORD /d "0" /f >nul 2>&1
    19825 Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-WindowsUpdateClient/Operational]" /v "Enabled" /t REG_DWORD /d "0" /f >nul 2>&1
    And one more thing: turning off the Windows update does not work in Win11Home - updates are downloaded and installed automatically. With Win11Pro, everything is fine. 22H2 22621.1105.
     
  13. smurfingtheweb77

    smurfingtheweb77 MDL Novice

    Feb 11, 2023
    4
    1
    0
    I only have a C drive. Im running this off a laptop with 1 nvme drive. I ran it on my desktop and then tried the root C:/ but still have the same issue
     
  14. smurfingtheweb77

    smurfingtheweb77 MDL Novice

    Feb 11, 2023
    4
    1
    0
    #24674 smurfingtheweb77, Feb 13, 2023
    Last edited: Feb 13, 2023

    I was able to stop the script from telling me access denied but its back to saying the application failed to start. Any ideas there?



    ===============================================================================
    MSMG ToolKit - Removing Windows Components
    ===============================================================================

    -------------------------------------------------------------------------------
    ####Starting Removing Windows Components#######################################
    -------------------------------------------------------------------------------

    Image : Install.wim
    Image Index : 1
    Image Architecture : x64
    Image Version : 10.0.19041.2006.0

    -------------------------------------------------------------------------------
    ####Removing Windows Components################################################
    -------------------------------------------------------------------------------

    ===========================[Install.wim, Index : 1]============================

    The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
    -------------------------------------------------------------------------------
    ####Finished Removing Windows Components#######################################
    -------------------------------------------------------------------------------

    ===============================================================================

    Press any key to continue . . .
     
  15. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,748
    3,575
    60
    No. If you run Start.cmd as admin, I believe that nsudo will be bypassed or it will run but it will verify that the rights are elevated and it seems to me that for this reason it ends up not doing the complete procedure.

    You can take the Test there. If 2 clicks on Start.cmd the NSudo window will open.
    If you start as Admin UAC will open. If anyone want to use without NSudo, just start Toolkit.cmd as admin. But it doesn't work for removing components through the ToolkitHelper list or menus.
     
  16. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,748
    3,575
    60
    Look what I wrote in the post above.
    If you have UAC turned off, I believe it's another problem to run with NSudo, this has to be checked.
    When these errors happen you should discard everything... Restart the Laptop and start the procedure again. Always use the tool until you finish the process without using other wim image editing tools at the same time in parallel. If you need to make any manual changes to the mount points, do so and close windows explorer before continuing.
     
  17. gesla

    gesla MDL Novice

    Nov 2, 2017
    26
    6
    0
    Yes,it is Capture Picker!
    How to restore Capture Picker?
    I try to copy the files to my system, but it doesn't work.
     
  18. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,748
    3,575
    60
    #24678 inTerActionVRI, Feb 14, 2023
    Last edited: Feb 20, 2023
    @MSMG,

    I think it's interesting to put a section in the main post for newcomers in the thread. A spoiler containing known issues and first precautions to start procedures.

    It is interesting to concentrate this information in a small space.

    1. .NET FrameWork 4.8 or 4.8.1 is prerequisite for properly works Removing Components through ToolkitHelper's list or Menu;
    2. Short Path like C:\MSMG;
    3. No folders with spaces, dots, parentesis or sqare brackets;
    4. No image wim in working progress from another processes at same time like Convert-UUP, W10UI, NTlite, etc;

    1. Disabled UAC may cause NSudo bypass extra TrustedInstaller Elevating Rights process;
    2. Start the "Toolkit.cmd" or "Start.cmd" as admin cause NSudo bypass extra TrustedInstaller Elevating Rights process;
    Then Removing Components through ToolkitHelper's list or Menu will not properly works;
    3. Servicing Builds that are not supported by ToolkitHelper may cause Windows Update failures;
    4. Using Windows Update, allowing installation of CU or LCU, several removed components will return;
    5. Removing the "Windows Setup" Component will break the In-place Update method;
    6. Using the 1st option in Apply Menu for builds from 18362 onwards cause the Ghost SFC error. If you see the error through SFC /SCANNOW command you have fixed the issue. :rolleyes::eek::D:p

    Recommended for monthly update: Disable Windows Update through the Customize Menu and use the In-place Update method. You need to keep the "Windows Setup" Component.
    For those who know how to configure Windows Update to download only security updates, if you want, you can leave Windows Update active. Remnants of these updates remain after a new In-Place Update. But I believe it's just the uninstall information.

    EDIT: Update KNOWN ISSUES spoiler and added a recommendation.
     
  19. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,748
    3,575
    60
    You need to remake the ISO.

    Always test your ISO in VM before putting it into daily use.

    At some point you will be confident. But in the new major changes of Windows Versions you should test. From 19044 to 19045 I had several problems, because I trusted and did not take the test before.

    Sometimes I wonder how changing a number can be so tragic? hehehehehe
    Logically the changes were significant at the beginning and were unstable.

    At the moment the Inplace Update transition from 19044 to 19045 is ok.

    I don't know about the Inplace Update transition from 19044 or 19045 to 22000 or 22621. Anyone who did this recently can tell us something.
     
    Hey @MSMG just wanna tell you that your MSMG Toolkit is genius and great!

    I succeded in debloating unwanted "things" from my win11 22h2 with your toolkit, but somehow the cloud experience host and cbs client appear after installation:

    Microsoft.Windows.CloudExperienceHost
    Microsoft.Windows.Client.CBS

    What are those apps? I thought I've remove the CBS app during removal with your toolkit.

    How to remove those 2 apps?

    Pointing to your post above, would you mind telling me in detail how to remove the Cloud Experience Host on a live system? Using powershell get-appxpackage command, i saw it was an un-removable app.
    Thank you in advance for your kind help, and i wish u all the best.