How to delete Edge profiles programmatically

Zhu, Ligong 200 Reputation points
2024-07-31T15:16:58.8733333+00:00

User's image

Hi,

After creating several new Edge profiles in Windows 11, we need to find a way to delete them at runtime programmatically.

Is there anyway it can be done programmatically such as from command line?

I can see newly created Edge profiles in Windows registry here (image attached):

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Edge\Profiles

I am not sure it is the right way to delete profiles by removing those registry entries.

Our Edge version is:

Version 126.0.2592.68 (Official build) (64-bit)

Your help will be greatly appreciated.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,289 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShiJieLi-MSFT 9,166 Reputation points Microsoft Vendor
    2024-08-01T06:29:19.3266667+00:00

    Hi @Zhu, Ligong,

    Unfortunately, profiles can't be deleted via registry settings. Removing the listed entries does not delete the profiles.

    You can only remove the profile folders at %localappdata%\Microsoft\Edge\User Data.

    Please note if you try to delete the folders while Microsoft Edge is running, you won't be permitted to do that. You need to kill all msedge.exe instances first. A useful command line would be taskkill /f /im msedge.exe.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.