Skip to content

Host File Editor: no possibility to open as administrator #44100

@alexravenna

Description

@alexravenna

Microsoft PowerToys version

0.96.1

Installation method

WinGet

Area(s) with issue?

Hosts File Editor

Steps to reproduce

  1. Run PowerToys as administrator:
Image
  1. Check Host File Editor settings, see that "Open as administrator" is grayed out (as per a comment in Can't active host file editor with administrator right #22230):Image

  2. Click on "Open Hosts File Editor"

  3. Notice that the window title does not start with "Administrator" and that the note "The hosts file cannot be saved because the program isn't running as administrator":

Image
  1. Notice that the "Add" button is grayed out in the "Add new entry" pop-up:
Image

✔️ Expected Behavior

I expect the Hosts File Editor to open with administrator rights when everything in PowerToys is apparently configured for it to do so.

❌ Actual Behavior

The Hosts File Editor doesn't open with administrator rights, meaning I can't add or edit any entries.

Additional Information

OS Version: Microsoft Windows NT 10.0.26100.0
.NET Version: .NET 9.0.11
PowerToys is running as admin (elevated)
Install scope: per user
Operating System Language: English (United States)
System locale: en-US

Other Software

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugSomething isn't workingNeeds-TriageFor issues raised to be triaged and prioritized by internal Microsoft teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions