No, I don't do anything to make things more difficult. On the contrary, I do it to make things easier for the less experienced user. By the way, I installed Windows 11 just to do the tests and I believe I found the best way to make the script work well on Windows 11. I'm attaching the script and I ask you to test it and report back the results. There are two options: The first is to run the Start.cmd file, which uses nsudo to start the main script with elevated rights (in this option, no log file is created). The second is to run the 24H2_Integrator5.3_Start.cmd file, which will start the main script with elevated rights and will create the log file at the end. In my tests, everything went well, without errors. See the attached log file. edit: new version released
Hi SunLion! I tested your script and it worked great, it looks great, what I needed to be completely happy Congratulations! Thank you very much, Friend))).
Thank both of you, you both hung in there and kept refining the script. I look forward to using the latest 24H2_Integrator5.3. Somehow I have a feeling its only the beginning.
In the package I downloaded has only the usual Multi.cmd, when I run this as admin it deletes the iso & bat file as it did previously. Perhaps the download was corrupted?
First time reading the thread and had the same thing happen to me, I gotta admit that I was really confused about it hahaha. I'll also be waiting for a full upload, thank you very much for the work you've been doing SunLion (and everyone who contributed). I really liked the W10 version so I can't wait to test the 11.
@SunLion Just tested working flawlessly now, will run it through a VM for further testing Thank you for this. Ran in a VM & is working well!
Hi SunLion! Now you can use dism to remove Edge. Spoiler: Please take a look https://forums.mydigitallife.net/th...emetry-repository.63874/page-124#post-1862354 Spoiler: These lines of code can be removed. ECHO. ECHO ============================================================ ECHO Delete Edge Browser ECHO ============================================================ for /f %%x in ('dir /b "%~dp0mount\Program Files\WindowsApps\Microsoft.MicrosoftEdge.Stable*"') do (rmdir /q /s "%InstallMount%\Program Files\WindowsApps\%%x") for %%u in (Edge, EdgeCore, EdgeUpdate, EdgeWebView) do ( for /f "tokens=1 delims=" %%a in ('dir /b /ad "%~dp0mount\Program Files (x86)\Microsoft" 2^>nul ^| find /i "%%u"') do ( ECHO Removing %%a from Disk rd /q /s "%InstallMount%\Program Files (x86)\Microsoft\%%a" ) ) for %%u in (Microsoft-Edge-WebView) do ( for /f "tokens=1 delims=" %%a in ('dir /b /ad "%~dp0mount\Windows\System32" 2^>nul ^| find /i "%%u"') do ( ECHO Removing %%a from Disk rd /s /q "%~dp0mount\Windows\System32\%%a" ) ) ECHO. ECHO ============================================================ ECHO Hide Microsoft Edge from apps features ECHO ============================================================ reg add "HKLM\TK_SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Microsoft.MicrosoftEdge.ContentProcessComponent" /v "ActivationType" /t REG_DWORD /d "1" /f reg delete "HKLM\TK_SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f reg delete "HKLM\TK_SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f reg delete "HKLM\TK_SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f ECHO. ECHO ============================================================ ECHO Disabling Edge services ECHO =========================================================== for %%s in (edgeupdate, edgeupdatem) do ( for /f "tokens=1 delims=" %%a in ('reg query "HKLM\TK_SYSTEM\ControlSet001\Services" /e /k /f "%%s" 2^>nul ^| find /i "%%s"') do ( ECHO Disabling service %%s reg add "HKLM\TK_SYSTEM\ControlSet001\Services\%%s" /v "Start" /t REG_DWORD /d "4" /f ) )
I added this command below (line 847) ECHO ============================================================ ECHO Remove Edge Browser ECHO ============================================================ if exist "%~dp0temp" rd /s/q "%~dp0temp" >NUL 2>&1 mkdir "%~dp0temp" >NUL 2>&1 "%DISM11%" /English /scratchdir:"%~dp0temp" /image:"%~dp0mount" /Remove-Edge And the error below occurred ============================================================ Remove Edge Browser ============================================================ Deployment Image Servicing and Management tool Version: 10.0.26100.1 Error: 32 An initialization error occurred. For more information, review the log file. The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log I don't think it's worth modifying the script. We would need to understand the command better before doing anything.
ECHO. ECHO ============================================================ ECHO Remove-Edge ECHO ============================================================ "%DISM11%" /english /image:%~dp0mount /Remove-Edge My test went well. Spoiler "test.cmd" Script - Running As Trusted Installer by nSudo. ============================================================ Unpacking ISO/DVD image: "ru-ru_windows_11_enterprise_ltsc_2024_x64_dvd_f9af5773.iso" to DVD directory... ============================================================ 7-Zip 24.07 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-06-19 Scanning the drive for archives: 1 file, 5025744896 bytes (4793 MiB) Extracting archive: ISO\PRO\ru-ru_windows_11_enterprise_ltsc_2024_x64_dvd_f9af5773.iso -- Path = ISO\PRO\ru-ru_windows_11_enterprise_ltsc_2024_x64_dvd_f9af5773.iso Type = Udf Physical Size = 5025744896 Version = 1.02 Cluster Size = 2048 Sector Size = 2048 Created = 2024-09-07 01:00:00.000000 Modified = 2024-09-07 01:00:00.000000 Comment = { Primary Volumes: PrimaryVolumeDescriptorNumber: 0 VolumeSequenceNumber: 1 VolumeId: UDF Volume VolumeSetId: e1cf4000MS UDFBridge ApplicationId: ImplementationId: *Microsoft CDIMAGE UDF::Windows NT Partitions: PartitionIndex: 0 PartitionNumber: 2989 ContentsId: +NSR02 ImplementationId: *Microsoft CDIMAGE UDF::Windows NT AccessType: Read-Only Size: 5025122304 Pos: 622592 Logical Volumes: Id: CES_X64FREV_RU-RU_DV9 BlockSize: 2048 DomainId: *OSTA UDF Compliant::1.02 ImplementationId: *Microsoft CDIMAGE UDF::Windows NT Partition Maps: PartitionMap: 0 Type: 1 VolumeSequenceNumber: 1 PartitionNumber: 2989 File Sets: FileSetNumber: 0 FileSetDescNumber: 0 LogicalVolumeId: CES_X64FREV_RU-RU_DV9 Id: CES_X64FREV_RU- CopyrightId: AbstractId: DomainId: *OSTA UDF Compliant::1.02 } Everything is Ok Folders: 102 Files: 1057 Size: 5019812471 Compressed: 5025744896 1 Deployment Image Servicing and Management tool Version: 10.0.26100.1 Details for image : D:\Win\Integrator11_24H2\DVD\sources\install.wim Index : 1 Name : Windows 11 Корпоративная LTSC Description : Windows 11 Корпоративная LTSC Size : 18 284 772 237 bytes WIM Bootable : No Architecture : x64 Hal : <undefined> Version : 10.0.26100 ServicePack Build : 1742 ServicePack Level : 0 Edition : EnterpriseS Installation : Client ProductType : WinNT ProductSuite : Terminal Server System Root : WINDOWS Directories : 24529 Files : 100669 Created : 06.09.2024 - 5:28:02 Modified : 06.09.2024 - 510 Languages : ru-RU (Default) The operation completed successfully. ============================================================ Mounting installation image 1 ============================================================ Deployment Image Servicing and Management tool Version: 10.0.26100.1 Mounting image [==========================100.0%==========================] The operation completed successfully. ============================================================ Remove-Edge ============================================================ Deployment Image Servicing and Management tool Version: 10.0.26100.1 Image Version: 10.0.26100.1742 The operation completed successfully. Deployment Image Servicing and Management tool Version: 10.0.26100.1 Image File : D:\Win\Integrator11_24H2\DVD\sources\install.wim Image Index : 1 Saving image [==========================100.0%==========================] Unmounting image [========= 16.0% ] Try Without SCRATCH This startup directive allows the user to specify the location of the Temporary directory for created files.
You can, or just remove it in this part of the code: Spoiler Code: ECHO. ECHO. ECHO ============================================================ ECHO Removing capabilities ... ECHO ============================================================ set "RemoveCapabilities=App.StepsRecorder,App.Support.QuickAssist,Hello.Face,OneCoreUAP.OneSync,Browser.InternetExplorer" I also need it, so I remove it from this part of the code.
This code only deletes the Microsoft folder with its files (I have used this before). To completely remove it, you need to clear the remains of Edge in the registry. To do this, you need to adapt this code to your scenario and add it too: Code: :: === Cleaning up Edge remnants in the registry === D:\WimLocal\tools\SU64.exe /w /s Powershell "LS HKLM:\WIM_SOFTWARE -Rec -ea 0|?{$_.Name -Match 'edge' -and $_.Name -NotMatch 'EdgeGesture'}|RI -Rec"