Skip to content

Commit

Permalink
Merge #3996 Suppress admin user check for URL handler registration
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jan 10, 2024
2 parents eaefca5 + d27f569 commit 62a0bc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## v1.34.5

### Bugfixes

- [GUI] Suppress admin user check for URL handler registration (#3996 by: HebaruSan)

### Internal

- [Policy] Fix #3518 rewrite de-indexing policy (#3993 by: JonnyOThan; reviewed: HebaruSan)
Expand Down
10 changes: 4 additions & 6 deletions GUI/URLHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void RegisterURLHandler(GUIConfiguration config, IUser user)
{
try
{
RegisterURLHandler_Win32();
RegisterURLHandler_Win32();
}
catch (UnauthorizedAccessException)
{
Expand All @@ -69,14 +69,12 @@ public static void RegisterURLHandler(GUIConfiguration config, IUser user)
if (user.RaiseYesNoDialog(Properties.Resources.URLHandlersPrompt))
{
// we need elevation to write to the registry
ProcessStartInfo startInfo = new ProcessStartInfo(
Assembly.GetEntryAssembly().Location)
Process.Start(new ProcessStartInfo(Assembly.GetEntryAssembly().Location)
{
// trigger a UAC prompt (if UAC is enabled)
Verb = "runas",
Arguments = $"gui {UrlRegistrationArgument}"
};
Process.Start(startInfo);
Arguments = $"gui --asroot {UrlRegistrationArgument}"
});
}
else
{
Expand Down

0 comments on commit 62a0bc7

Please sign in to comment.