privacy.sexy icon indicating copy to clipboard operation
privacy.sexy copied to clipboard

[BUG]: Microsoft Edge uninstall script leaves a blank app in start menu

Open Daksh777 opened this issue 3 years ago • 18 comments

Describe the bug

image Restarting the system does not help

OS

Windows 10 20H2 Build 19042.928

Daksh777 avatar Apr 18 '21 05:04 Daksh777

Hi, thanks for the report! Is it caused by removing legacy edge (system app) or chromium edge?

undergroundwires avatar Apr 18 '21 10:04 undergroundwires

Hi, thanks for the report! Is it caused by removing legacy edge (system app) or chromium edge?

It's the Chromium Edge

Daksh777 avatar Apr 18 '21 13:04 Daksh777

I could not reproduced it following:

  1. Install chromium edge using (download url)
  2. Check where the shortcuts are created. The installer created one at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk
  3. Uninstall it using privacy.sexy
  4. The shortcut does not exist anymore (uninstaller removes it)

We call the official uninstaller for chromium Edge but deleting Edge (legacy system app) does not use any uninstaller so it may leave some residual files. I'll check the shortcut situation for legacy edge.

undergroundwires avatar Apr 25 '21 17:04 undergroundwires

I did the exact same steps as you did and it unfortunately did not remove the shortcut for me.

Installed Edge Chromium: image

Used privacy.sexy script: image

No Microsoft Edge.ink in C:\ProgramData\Microsoft\Windows\Start Menu\Programs: image

Daksh777 avatar Apr 26 '21 05:04 Daksh777

Hi thanks for the sharing your findings again @Daksh777 , so I was wrong to guess that the icon in the start menu is that shortcut file. It seems to be something else. I am not sure which file/registry entry is being created for that blank app in that case.

undergroundwires avatar Apr 26 '21 15:04 undergroundwires

I am also unable to find the source of that blank entry in the start menu, let me know if you need me to do anything.

Daksh777 avatar Apr 27 '21 03:04 Daksh777

@Daksh777 could you look at where the shortcut is saved?

undergroundwires avatar Aug 21 '21 17:08 undergroundwires

I can't seem to find the location of the shortcut since there is no option to open the shortcut's location image

After creating a shortcut link off of the icon to the desktop, all I see is this: image

Daksh777 avatar Aug 23 '21 06:08 Daksh777

Thanks for responding back @Daksh777 . Maybe it's in %UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs?

undergroundwires avatar Aug 28 '21 11:08 undergroundwires

No, it's not present there either. I searched through the whole system (using Search Everything) to find Microsoft Edge shortcuts, deleted them all but it still is present there.

Daksh777 avatar Aug 28 '21 11:08 Daksh777

Giving one last shot, is it in %UserProfile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch ?

undergroundwires avatar Aug 28 '21 14:08 undergroundwires

While there was a shortcut in that location, deleting it had no effect.

Daksh777 avatar Aug 29 '21 03:08 Daksh777

I have exactly the same issue. I'm using Windows 10 Home 21H1

oldcastlehq avatar Sep 22 '21 07:09 oldcastlehq

it's just leftover/dummy package from the old win10 version which is same as the legacy edge. However i didn't see this entry after uninstalling new edge. According to some report on google force removing this dummy from system driver may probably break windows updates.

eebssk1 avatar Oct 01 '21 10:10 eebssk1

@undergroundwires @Daksh777 this will do: https://dl.malwarewatch.org/multipurpose/UninstallEdge.zip or attachment un-zip it and run Uninstall Edge.cmd as ADMIN(Disable defender before running) this will remove LEGACY version of edge can be used after uninstalling edge CHROMIUM Edit:Restart NEEDED UninstallEdge.zip

image

femdiya avatar Feb 14 '22 09:02 femdiya

This is golden. I have not tested this against residual files because I was never be able to produce this. But we should still add this functionality in privacy.sexy.

The script you included calls install_wim_tweak.exe with Microsoft-Windows-Internet-Browser-Package. Someone shared source code code for install_wim_tweak.exe. It removes CBS package registry values that we don't do here.

The logic written there has two issues:

  • Depends on legacy Windows component(s).
  • It's one way only, no back-ups or no revert logic.

When I find the time, I will rewrite this using PowerShell, modern components and a solid way to revert with backups. We can benefit from this CBS package cleanup on other places as well.

Thank you for the solution @bardiarajabi and all your contributions. You have been helping a lot to make this a better software.

undergroundwires avatar Mar 06 '22 22:03 undergroundwires

This is golden. I have not tested this against residual files because I was never be able to produce this. But we should still add this functionality in privacy.sexy.

The script you included calls install_wim_tweak.exe with Microsoft-Windows-Internet-Browser-Package. Someone shared source code code for install_wim_tweak.exe. It removes CBS package registry values that we don't do here.

The logic written there has two issues:

  • Depends on legacy Windows component(s).
  • It's one way only, no back-ups or no revert logic.

When I find the time, I will rewrite this using PowerShell, modern components and a solid way to revert with backups (of registry settings). We can benefit from this CBS package cleanup on other places as well.

Thank you for the solution @bardiarajabi and all your contributions. You have been helping a lot to make this a better software.

undergroundwires avatar Mar 06 '22 22:03 undergroundwires

@undergroundwires No Problem! Yes, only legacy windows components. btw I found it on a youtube channel called endermanch which is advanced in windows tips/tricks. Channel: https://www.youtube.com/channel/UCWb-66XSFCV5vgKEbl22R6Q Video: https://youtu.be/g1dMF-W0d04?t=183 P.S.: At the time that he uploaded the video it was the only legacy edge, not chromium.

femdiya avatar Mar 07 '22 08:03 femdiya

doesnt work

YofukashiNo avatar Mar 19 '22 03:03 YofukashiNo

shell:appsfolder is where the shortcut is. and UWP apps gets added here automatically from what i got to know and please find a working solution the problem. the blank shortcut gives me anxiety

YofukashiNo avatar Mar 23 '22 22:03 YofukashiNo

@Tharki-God Can a normal or admin user delete the shortcut?

no they cant, i am using the in-built admin account as my daily driver and i cant. upon searching you cant edit that location. uwp apps installed get shortcut there automatically and exe files with the help of traditional start menu folder. so there must be some way to remove edge from installed list.

YofukashiNo avatar Mar 24 '22 19:03 YofukashiNo

HKEY_CURRENT_USER\Software\Microsoft\Edge
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Edge

are the only two registries related to the edge left on my pc? even if I delete them they are there after the restart if that helps.

YofukashiNo avatar Mar 26 '22 23:03 YofukashiNo

https://james-rankin.com/articles/how-to-remove-uwp-apps-on-windows-10-v1803/ if this helps

YofukashiNo avatar Mar 29 '22 01:03 YofukashiNo

I've been able to reproduce the issue consistently now, so I will work on this. There will be a few iterations until this will be fixed. Thank you to everyone for providing context.

Delete all related .lnk files

First improvement I'm planning to do is to remove all the shortcut files (.lnk) files. According to my tests they exist at (tested on 22H2):

Path Windows 11 Windows 10
%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk ✅ Exists ✅ Exists
%AppData%\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk ✅ Exists ✅ Exists
%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Microsoft Edge.lnk ✅ Exists ✅ Exists
%Public%\Desktop\Microsoft Edge.lnk ✅ Exists ✅ Exists
%SystemRoot%\System32\config\systemprofile\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk ✅ Exists ✅ Exists
%UserProfile%\Desktop\Microsoft Edge.lnk ❌ Missing ❌ Missing

I have also tested and can verify that the default uninstaller(s) provided by the OS do not delete all of them.

DisableEdgeDesktopShortcutCreation

After some research I found the key DisableEdgeDesktopShortcutCreation that's supposed to disable creation of Edge shortcut for user profiles. This key is highly undocumented. According to my tests, Edge does not add shortcut to every user profile but only to public desktop (%Public%\Desktop\Microsoft Edge.lnk) and this file we can just remove, so I do not see the need to set this key to true.

Ongoing Work

While deleting these files is a positive step, it does not completely solve the issue as the icon remains in the start menu. I will continue to explore other methods and approaches to fully resolve this.

undergroundwires avatar Oct 02 '23 16:10 undergroundwires

shell:appsfolder

This is a "fake folder" and I have yet find a way to modify it.

HKCU\Software\Microsoft\Edge, HKLM\SOFTWARE\Wow6432Node\Microsoft\Edge

These keys include settings for Edge but do not seem to have any effect on start menu icon. For me, deleting them was persistent across reboots. HKLM key was gone for good and HKCU key was recreated with an empty value but missing all other configurations. Maybe we should add deletion of them manually once Edge is uninstalled 🤔

https://james-rankin.com/articles/how-to-remove-uwp-apps-on-windows-10-v1803/ if this helps

His suggestion of renaming files in c:\programdata\microsoft\windows\apprepository\packages makes sense. However there's no metadata (folder) there about Edge, so it does not work. But I will still update privacy.sexy to handle this directory for system app removal, so thank you for the contribution ❤️

undergroundwires avatar Oct 02 '23 17:10 undergroundwires

Years after, this is finally fixed and released in 0.12.6 🚀. The solution was to remove appx package. Please create a new issue in future if you detect something.

undergroundwires avatar Nov 04 '23 12:11 undergroundwires

That is amazing, thanks a ton for working on this even after years @undergroundwires, haha! I hope you have a great day :)

Daksh777 avatar Nov 12 '23 11:11 Daksh777