rcmaehl / MSEdgeRedirect

A Tool to Redirect News, Search, Widgets, Weather and More to Your Default Browser
https://MSEdgeRedirect.com
GNU Lesser General Public License v3.0
3.96k stars 92 forks source link

"Edge Set As Default" error due to Windows ignoring URL Associations #274

Closed stlinkgangs closed 9 months ago

stlinkgangs commented 1 year ago

Preflight Checklist

Install Type

New Install

Install Mode

Active Mode

Steps to reproduce

Download january 2023 .exe release Open .exe Select Active Mode Enter Admin Password --> ERROR "Edge Set As Default" "You must set a different Default Browser to use MSEdgeRedirect!" I have set Chrome as my default browser including for every available file extension Ms Edge is still default for a few specific file extensions, where no other app was available, such as ".mht" ".mhtml" "MICROSOFT-EDGE" "MICROSOFT-EDGE-HOLOGRAPHIC" "MS-XBL-3D8B930F" and "READ" I also tried setting firefox as default but got the same error Then I tried setting MS-Edge as default but got the same Error then I set Chrome as default and downloaded the October 27 2022 release but got the same error trying all previous steps The redirect works fine when installing Service Mode

Nonetheless Thanks a lot for developping this for the community - you guys are the ones that help make the user experience of windows etc. that much better

✔️ Expected Behavior

Successfull install of active mode

❌ Actual Behavior

ERROR "Edge Set As Default" "You must set a different Default Browser to use MSEdgeRedirect!"

Microsoft Windows version

Version 21H2 (OS Build 19044.2965)

Other Software

Just standard Windows 10 Pro - no VM no additional piece of software inbetween

rcmaehl commented 1 year ago

Can you check the registry value of ProgID for

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice

stlinkgangs commented 1 year ago

Thanks for responding so quickly, I checked:

\http\UserChoice --> ProgId Data=ChromeHTML

\https\UserChoice --> ProgId Data=ChromeHTML

rcmaehl commented 1 year ago

Thanks for responding so quickly, I checked:

\http\UserChoice --> ProgId Data=ChromeHTML

\https\UserChoice --> ProgId Data=ChromeHTML

I've made changes that should fix this. The only thing I can think of is that the program failed to read the registry values.

stlinkgangs commented 1 year ago

I tried the newest release, however still no luck, same error as before

stlinkgangs commented 1 year ago

Could you reopen the issue?

stlinkgangs commented 1 year ago

Maybe it does indeed fail to read the registry values. I disabled certain Windows telemetry tasks in Task Scheduler, but I was very careful, so I dont think it has something to do with it.

stlinkgangs commented 1 year ago

Does the program require certain autoruns? I had disabled some of the autoruns (not sure if edge update was among those) a few months ago, does the program depend on certain autoruns being active?

stlinkgangs commented 1 year ago

Is there any way for me to check if it fails to read the registry?

rcmaehl commented 1 year ago

I've already set it to pass if the registry reads fail.

The way the code works is that it checks if

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\microsoft-edge\UserChoice\ProgID contains "MSEdge"

If so, it compares HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\ProgID and HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice\ProgID to see if either of them are set the same as microsoft-edge\UserChoice\ProgID.

I'll be adding a /force flag when I get home to ignore this check but I'm honestly not sure why it's failing for you. Can you provide any additional details about changes you've made? Have you used any other Edge modifications? Also, are you on 32bit or 64bit Windows?

Sorry to hear this wasn't fixed for you!

stlinkgangs commented 1 year ago

64bit System Information: OS Name Microsoft Windows 10 Pro Version 10.0.19044 Build 19044 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Name CLASSIFIED System Manufacturer Notebook System Model CLASSIFIED System Type x64-based PC System SKU Not Applicable Processor Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 2808 Mhz, 4 Core(s), 8 Logical Processor(s) BIOS Version/Date American Megatrends Inc. 1.05.12, CLASSIFIED/2018 SMBIOS Version 3.0 Embedded Controller Version 255.255 BIOS Mode UEFI BaseBoard Manufacturer Notebook BaseBoard Product CLASSIFIED BaseBoard Version Not Applicable Platform Role Mobile Secure Boot State Off PCR7 Configuration Elevation Required to View Windows Directory C:\windows System Directory C:\windows\system32 Boot Device \Device\HarddiskVolume1 Locale United States Hardware Abstraction Layer Version = "10.0.19041.2728" User Name CLASSIFIED Time Zone CLASSIFIED Installed Physical Memory (RAM) 16,0 GB Total Physical Memory 15,9 GB Available Physical Memory 8,09 GB Total Virtual Memory 30,4 GB Available Virtual Memory 20,5 GB Page File Space 14,5 GB Page File C:\pagefile.sys Kernel DMA Protection Off Virtualization-based security Running Virtualization-based security Required Security Properties
Virtualization-based security Available Security Properties Base Virtualization Support, DMA Protection, Mode Based Execution Control Virtualization-based security Services Configured
Virtualization-based security Services Running
Device Encryption Support Elevation Required to View A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Consolidator - SpeechModelDownloadTask Office ClickToRun Service Monitor Office Automatic Updates 2.0 Office Feature Updates Office Feature Updates Logon PcaPatchDbTask ProgramDataUpdater StartupAppTask ScanForUpdates Microsoft Compatibility Appraiser

From a forum post (I couldnt find the piece of paper where I wrote down which of them I actually disabled) https://www.tenforums.com/customization/180514-project-scheduled-tasks-can-disabled-without-drastic-impact.html

schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Disable schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask " /Disable schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable schtasks /Change /TN "Microsoft\Windows\Defrag\ScheduledDefrag" /Disable schtasks /Change /TN "Microsoft\Windows\Diagnosis\Scheduled" /Disable schtasks /Change /TN "Microsoft\Windows\DiskCleanup\SilentCleanup" /Disable schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable schtasks /Change /TN "Microsoft\Windows\HelloFace\FODCleanupTask" /Disable schtasks /Change /TN "Microsoft\Windows\Location\Notifications" /Disable schtasks /Change /TN "Microsoft\Windows\Location\WindowsActionDialog" /Disable schtasks /Change /TN "Microsoft\Windows\Management\Provisioning\Cellular" /Disable schtasks /Change /TN "Microsoft\Windows\Maps\MapsToastTask" /Disable schtasks /Change /TN "Microsoft\Windows\Maps\MapsUpdateTask" /Disable schtasks /Change /TN "Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser" /Disable schtasks /Change /TN "Microsoft\Windows\Ras\MobilityManager" /Disable schtasks /Change /TN "Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask" /Disable schtasks /Change /TN "Microsoft\Windows\Servicing\StartComponentCleanup" /Disable schtasks /Change /TN "Microsoft\Windows\Speech\SpeechModelDownloadTask" /Disable schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable schtasks /Change /TN "Microsoft\Windows\Windows Media Sharing\UpdateLibrary" /Disable schtasks /Change /TN "Microsoft\XblGameSave\XblGameSaveTask" /Disable

Right I remember, then I had found a nice github script, I didnt use it but I checked the code and manually made the changes (Again not all but only some, cause I looked them up on google one by one to determine if I would break something by disabling it...)

https://github.com/R-Studio/PSTools/blob/master/Public/Disable-TelemetryOnWin10.ps1

If your Interested, here is a github program feature some of the before mentioned changes, just automated and visualized... https://github.com/undergroundwires/privacy.sexy

stlinkgangs commented 1 year ago

By the way, running the program in service mode is eating up a lot of resources almost 10% of my CPU constantly. Is the resource consumption different in active mode?

stlinkgangs commented 1 year ago

Should I send you screenshots of my autoruns settings?

rcmaehl commented 1 year ago

By the way, running the program in service mode is eating up a lot of resources almost 10% of my CPU constantly. Is the resource consumption different in active mode?

Active mode doesn't require the app running in the background, so it essentially doesn't have any background CPU usage. I'll look into Service Mode CPU usage later on.

I'm looking into privacy.sexy to see if anything might have affected things.

If you're able to download the latest test build, let me know if it persists with the /force flag

stlinkgangs commented 1 year ago

What test build do you mean? As I mentioned, I already tested V.0.7.4.0

darren12345 commented 1 year ago

I had this error when trying to update, and the two reg keys mentioned above were set to Edge even though my default browser is Firefox. I changed the values to ChromeHTML (I don't know what the Firefox setting should be) and MSEdgeRedirect then installed fine. AFAICS, FF is still my default browser despite the value of the reg keys.

rcmaehl commented 1 year ago

I had this error when trying to update, and the two reg keys mentioned above were set to Edge even though my default browser is Firefox. I changed the values to ChromeHTML (I don't know what the Firefox setting should be) and MSEdgeRedirect then installed fine. AFAICS, FF is still my default browser despite the value of the reg keys.

Interesting. That shouldn't be the case, but I'll get that fixed for 0.8 then

rcmaehl commented 9 months ago

This should no longer be an issue as the default browser check is no longer implemented

stlinkgangs commented 9 months ago

I decided to give it another try and sure enough I was able to get the previous version (0.7.4.0) working by editing the registry keys for http and https. However it only worked when opening the registry with elevated privileges, otherwise Windows silently reverted the changes after closing the registry. (I might have forgotten to open the registry as admin last time). After updating to version 0.7.5.0, I again had to change the registry keys manually in order to get it to work. Now that the app is running in active mode, I have zero issues with it, everything works perfectly. I like that its not constantly running and consuming (excessive) system resources as it did in service mode.

rcmaehl commented 9 months ago

I like that its not constantly running and consuming (excessive) system resources as it did in service mode.

One of these days I'll port Service Mode to C# but I have to learn it first 😂