Browse buttons crash when running as admin #12299

Closed
opened 2026-01-31 03:11:39 +00:00 by claunia · 8 comments
Owner

Originally created by @carlos-zamora on GitHub (Jan 29, 2021).

Originally assigned to: @DHowett on GitHub.

The optional graphical settings editor worked properly when I ran Windows Terminal as a regular user. However, if I ran Windows Terminal as Administrator, the app would crash if I clicked the "Browse..." button for either "Command line" or "Starting directory".

Originally posted by @huang63 in https://github.com/microsoft/terminal/issues/6800#issuecomment-769568274

Originally created by @carlos-zamora on GitHub (Jan 29, 2021). Originally assigned to: @DHowett on GitHub. The optional graphical settings editor worked properly when I ran Windows Terminal as a regular user. However, if I ran Windows Terminal as Administrator, the app would crash if I clicked the "Browse..." button for either "Command line" or "Starting directory". _Originally posted by @huang63 in https://github.com/microsoft/terminal/issues/6800#issuecomment-769568274_
Author
Owner

@carlos-zamora commented on GitHub (Jan 29, 2021):

Did a bit of digging on this one. Here's my findings:

Relevant PR: #8391

The culprit is this call right here:
e7d32625be/src/cascadia/TerminalSettingsEditor/Profiles.cpp (L348)

I'm not exactly sure what is going on though. Looks like PickSingleFolderAsync() failed, and GetResults() returns a bad HRESULT.

Assigning @DHowett for now to provide some ideas/insight on next steps.

@carlos-zamora commented on GitHub (Jan 29, 2021): Did a bit of digging on this one. Here's my findings: Relevant PR: #8391 The culprit is this call right here: https://github.com/microsoft/terminal/blob/e7d32625befb85e5b40380de20c62172e7275c5e/src/cascadia/TerminalSettingsEditor/Profiles.cpp#L348 I'm not exactly sure what is going on though. Looks like `PickSingleFolderAsync()` failed, and `GetResults()` returns a bad HRESULT. Assigning @DHowett for now to provide some ideas/insight on next steps.
Author
Owner

@DHowett commented on GitHub (Jan 29, 2021):

You’re gonna need to give me that HRESULT!

I’m guessing this is the same class of problem as “i can’t drag tabs in admin mode”. Same team, same APIs...

@DHowett commented on GitHub (Jan 29, 2021): You’re gonna need to give me that HRESULT! I’m guessing this is the same class of problem as “i can’t drag tabs in admin mode”. Same team, same APIs...
Author
Owner

@WSLUser commented on GitHub (Jan 29, 2021):

I'm now betting https://github.com/microsoft/terminal/issues/8950 is extremely related. It didn't matter if it was elevated or not so I think invalid paths are still an issue that likely correlate to this bug. Perhaps they have the same fix (one can hope).

@WSLUser commented on GitHub (Jan 29, 2021): I'm now betting https://github.com/microsoft/terminal/issues/8950 is extremely related. It didn't matter if it was elevated or not so I think invalid paths are still an issue that likely correlate to this bug. Perhaps they have the same fix (one can hope).
Author
Owner

@carlos-zamora commented on GitHub (Jan 29, 2021):

You’re gonna need to give me that HRESULT!

I’m guessing this is the same class of problem as “i can’t drag tabs in admin mode”. Same team, same APIs...

-2147467259 --> 0x80004005 : 'Unspecified error'. --> E_FAIL is returned from the GetResults() call.

@carlos-zamora commented on GitHub (Jan 29, 2021): > You’re gonna need to give me that HRESULT! > > I’m guessing this is the same class of problem as “i can’t drag tabs in admin mode”. Same team, same APIs... `-2147467259` --> `0x80004005 : 'Unspecified error'.` --> `E_FAIL` is returned from the `GetResults()` call.
Author
Owner

@carlos-zamora commented on GitHub (Feb 11, 2021):

@DHowett friendly bump on this thread to get it on your radar

@carlos-zamora commented on GitHub (Feb 11, 2021): @DHowett friendly bump on this thread to get it on your radar
Author
Owner

@zadjii-msft commented on GitHub (Mar 2, 2021):

In #9341, @rileysea was also seeing this unelevated 😬

@zadjii-msft commented on GitHub (Mar 2, 2021): In #9341, @rileysea was also seeing this _unelevated_ 😬
Author
Owner

@ghost commented on GitHub (Apr 14, 2021):

:tada:This issue was addressed in #9760, which has now been successfully released as Windows Terminal v1.7.1033.0.🎉

Handy links:

@ghost commented on GitHub (Apr 14, 2021): :tada:This issue was addressed in #9760, which has now been successfully released as `Windows Terminal v1.7.1033.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.7.1033.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Apr 14, 2021):

:tada:This issue was addressed in #9760, which has now been successfully released as Windows Terminal Preview v1.8.1032.0.🎉

Handy links:

@ghost commented on GitHub (Apr 14, 2021): :tada:This issue was addressed in #9760, which has now been successfully released as `Windows Terminal Preview v1.8.1032.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.8.1032.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12299