Unable to open settings (profiles.json): ShellExecute in LaunchSettings returns ERROR_ACCESS_DENIED #1835

Closed
opened 2026-01-30 22:39:08 +00:00 by claunia · 2 comments
Owner

Originally created by @brettfo on GitHub (Jun 22, 2019).

Environment

Windows build number: 10.0.18362.175 (1903)
Windows Terminal version (if applicable): 0.2.1715.0

Any other software? No

Steps to reproduce

Open the settings file, either through the UI or via Ctrl+,

Expected behavior

The settings file to open.

Actual behavior

Nothing visible happens.

I built and debugged locally from the 0.2.1715.0 sources (66cb7c4b58) and found that ShellExecute in LaunchSettings was returning 5 (ERROR_ACCESS_DENIED according to winerror.h, line 265). The value of settingsPath was properly formed (C:\Users\brettfo\AppData\Local\Packages\WindowsTerminalDev_<some-garbage-characters>\RoamingState\profiles.json) and the file exists on disk with the expected contents.

I also found the settings file corresponding to the app installed from the Store at C:\Users\brettfo\AppData\Local\Packages\Microsoft.WindowsTerminal_<some-garbage-characters>\RoamingState\profiles.json which is also correct and changed settings are appropriately reflected in the app.

Originally created by @brettfo on GitHub (Jun 22, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.175 (1903) Windows Terminal version (if applicable): 0.2.1715.0 Any other software? No ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Open the settings file, either through the UI or via Ctrl+, # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> The settings file to open. # Actual behavior <!-- What's actually happening? --> Nothing visible happens. I built and debugged locally from the 0.2.1715.0 sources (66cb7c4b58b0e41ffaeb952ef27f1a8c67e90db8) and found that [ShellExecute in LaunchSettings](https://github.com/microsoft/terminal/blob/66cb7c4b58b0e41ffaeb952ef27f1a8c67e90db8/src/cascadia/TerminalApp/App.cpp#L440) was returning 5 (ERROR_ACCESS_DENIED according to winerror.h, line 265). The value of `settingsPath` was properly formed (`C:\Users\brettfo\AppData\Local\Packages\WindowsTerminalDev_<some-garbage-characters>\RoamingState\profiles.json`) and the file exists on disk with the expected contents. I also found the settings file corresponding to the app installed from the Store at `C:\Users\brettfo\AppData\Local\Packages\Microsoft.WindowsTerminal_<some-garbage-characters>\RoamingState\profiles.json` which is also correct and changed settings are appropriately reflected in the app.
claunia added the Area-SettingsIssue-BugResolution-DuplicateProduct-Terminal labels 2026-01-30 22:39:08 +00:00
Author
Owner

@mithunshanbhag commented on GitHub (Jun 22, 2019):

I too am facing the same issue. Please take a look at the attached screen capture gif below.

Some additional details:

  1. Windows Terminal (preview) version 0.2.1715.0. Downloaded from the Microsoft Store.
  2. This issue also repro'es for me when I build the windows terminal's github sources locally and launch the CascadiaPackage.
  3. The issue still repro'es even if I run the terminal as an elevated admin.
  4. Window Insider Build: 10.0.18922.1000 (fast-ring)
  5. I'm running Windows 10 on Macbook Air (4 proc, 8 GB RAM).
  6. As a workaround, I'm able to tweak the profile.json file manually and configure the settings.

Please let me know if I can provide any additional details.

microsoft-terminal-issue

@mithunshanbhag commented on GitHub (Jun 22, 2019): I too am facing the same issue. Please take a look at the attached screen capture gif below. Some additional details: 1. Windows Terminal (preview) version 0.2.1715.0. Downloaded from the Microsoft Store. 2. This issue also repro'es for me when I build the windows terminal's github sources locally and launch the CascadiaPackage. 3. The issue still repro'es even if I run the terminal as an elevated admin. 4. Window Insider Build: 10.0.18922.1000 (fast-ring) 5. I'm running Windows 10 on Macbook Air (4 proc, 8 GB RAM). 6. As a workaround, I'm able to tweak the profile.json file manually and configure the settings. Please let me know if I can provide any additional details. ![microsoft-terminal-issue](https://user-images.githubusercontent.com/2327905/59960789-33469580-94eb-11e9-8db0-469cbf6d7d72.gif)
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 24, 2019):

I accidentally made #1460 the master issue for this, so.. here goes!

@DHowett-MSFT commented on GitHub (Jun 24, 2019): I accidentally made #1460 the master issue for this, so.. here goes!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1835