FOR /f "delims=" %%I IN ('dir /s /b /o:n "%SystemDrive%\Users\%UserName%" ^| findstr /i ".lnk" ^| findstr /i "edge"') DO (del /q /s "%%I")
FOR /f "delims=" %%I IN ('dir /s /b /o:n "%SystemDrive%\Users" ^| findstr /i ".lnk" ^| findstr /i "edge"') DO (del /q /s "%%I")
; Microsoft Edge Icon removal
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{ffae50fd-8928-4e7e-a0c4-325b0daabae9}]
@="Edge icon removal"
"LocalizedName"="Microsoft Edge"
"IsInstalled"=dword:00000001
"StubPath"="%WinDir%\\system32\\cmd.exe /c \"FOR /f \"delims=\" %I IN ('dir /s /b /o:n \"%SystemDrive%\\Users\" ^| findstr /i \".lnk\" ^| findstr /i \"edge\"') DO (del /q /s \"%I\")\""
"Version"="1,0"
Hi George KingOK, this seems to be easy.
Save as LiveEdgeIconRemoval.reg and import in NTLite. This will remove all *Edge*.lnk in %SystemDrive%\Users. And this is lauched on every new user creation.
Code:; Microsoft Edge Icon removal Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{ffae50fd-8928-4e7e-a0c4-325b0daabae9}] @="Edge icon removal" "LocalizedName"="Microsoft Edge" "IsInstalled"=dword:00000001 "StubPath"="%WinDir%\\system32\\cmd.exe /c \"FOR /f \"delims=\" %I IN ('dir /s /b /o:n \"%SystemDrive%\\Users\" ^| findstr /i \".lnk\" ^| findstr /i \"edge\"') DO (del /q /s \"%I\")\"" "Version"="1,0"
FOR /f "delims=" %%I IN ('dir /s /b /o:n "%SystemDrive%\Users" ^| findstr /i ".lnk" ^| findstr /i "edge"') DO (del /q /s "%%I")
same result, doesn't workInteresting maybe is Active setup ignored for some reason?
Then try to add this directly into SetupComplete.cmd
Code:FOR /f "delims=" %%I IN ('dir /s /b /o:n "%SystemDrive%\Users" ^| findstr /i ".lnk" ^| findstr /i "edge"') DO (del /q /s "%%I")
If you want to run it manually from CMD you need to use %I not %%I. Thats diference in batch. Simply replace %%I with %I when running manuallysame result, doesn't work
also if i run manually that command, this error appear:
View attachment 4942
Thanks it's worked! but with that command delete all icon, i just need delete only edge shortcut in desktopIf you want to run it manually from CMD you need to use %I not %%I. Thats diference in batch. Simply replace %%I with %I when running manually
View attachment 4943