Bug Report - Immediate crash with message "Windows cannot access the specified device, path or file" after running as administrator #2102

Closed
opened 2026-01-30 22:46:49 +00:00 by claunia · 10 comments
Owner

Originally created by @amoerie on GitHub (Jun 24, 2019).

Launching the app immediately produces an error, seemingly related to file permissions.

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.116]
Windows Terminal version (if applicable): 0.2.1715.0_x64
This is a work computer inside an Active Directory domain, if that's relevant at all. I am administrator on my local machine though.

Steps to reproduce

Install Windows Terminal (Preview) from the Microsoft Store.
Launch the app as administrator.

Expected behavior

The application starts.

Actual behavior

The application immediately throws an error: "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

Extra notes

I previously built the source code and had it working fine by deploying the CascadiaPackage from within Visual Studio. Then I tried running the app as administrator, which broke it and has caused the aforementioned error to appear whenever I try to launch it now.

I was hoping that the "official" release via the Microsoft Store would fix the problem, but it didn't. (I completely uninstalled the beta version and removed my local copy of the source code beforehand).

Is there any place (logs, event log, ..) where I can see which file it's failing to find? That would help a lot. Thanks!

Originally created by @amoerie on GitHub (Jun 24, 2019). Launching the app immediately produces an error, seemingly related to file permissions. # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.116] Windows Terminal version (if applicable): 0.2.1715.0_x64 This is a work computer inside an Active Directory domain, if that's relevant at all. I am administrator on my local machine though. ``` # Steps to reproduce Install Windows Terminal (Preview) from the Microsoft Store. Launch the app as administrator. # Expected behavior The application starts. # Actual behavior The application immediately throws an error: "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." # Extra notes I previously built the source code and had it working fine by deploying the CascadiaPackage from within Visual Studio. Then I tried running the app as administrator, which broke it and has caused the aforementioned error to appear whenever I try to launch it now. I was hoping that the "official" release via the Microsoft Store would fix the problem, but it didn't. (I completely uninstalled the beta version and removed my local copy of the source code beforehand). Is there any place (logs, event log, ..) where I can see which file it's failing to find? That would help a lot. Thanks!
claunia added the Resolution-ExternalNeeds-Tag-FixProduct-Terminal labels 2026-01-30 22:46:49 +00:00
Author
Owner

@MajDogbyte commented on GitHub (Jun 24, 2019):

same symptoms for me, and i suspected that it started to break after i tried to run as Admin, because i wanted it to pickup my network admin $profile along with its scripts. It ran fine as the default user until i tried to run it as admin.

@MajDogbyte commented on GitHub (Jun 24, 2019): same symptoms for me, and i suspected that it started to break after i tried to run as Admin, because i wanted it to pickup my network admin $profile along with its scripts. It ran fine as the default user until i tried to run it as admin.
Author
Owner

@jbolduan commented on GitHub (Jun 25, 2019):

I'm also experiencing this issue. It runs fine if I run it as my normal non-admin account but when I try to launch using elevated credentials it prompts twice then gives and error saying it cannot find the C:\Program Files\WindowsApps.........\WindowsTerminal.exe file.

@jbolduan commented on GitHub (Jun 25, 2019): I'm also experiencing this issue. It runs fine if I run it as my normal non-admin account but when I try to launch using elevated credentials it prompts twice then gives and error saying it cannot find the C:\Program Files\WindowsApps\.........\WindowsTerminal.exe file.
Author
Owner

@JakeMoe commented on GitHub (Jun 27, 2019):

I've got the same as @jbolduan , it launches fine as my user account, but when I right click and run as admin, I get two UAC prompts, dropping back to desktop in between each for a moment or two, and then this error:
image

@JakeMoe commented on GitHub (Jun 27, 2019): I've got the same as @jbolduan , it launches fine as my user account, but when I right click and run as admin, I get two UAC prompts, dropping back to desktop in between each for a moment or two, and then this error: ![image](https://user-images.githubusercontent.com/2450407/60229198-72545c80-98d8-11e9-806e-27e72b247510.png)
Author
Owner

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

This is, unfortunately, a Windows issue. We've escalated as appropriate.

@DHowett-MSFT commented on GitHub (Jun 27, 2019): This is, unfortunately, a Windows issue. We've escalated as appropriate.
Author
Owner

@amoerie commented on GitHub (Jun 28, 2019):

Sorry to comment on a closed issue, but is there a manual workaround so we can use the new terminal as a regular user again? Right now it's completely unusable for me..

@amoerie commented on GitHub (Jun 28, 2019): Sorry to comment on a closed issue, but is there a manual workaround so we can use the new terminal as a regular user again? Right now it's completely unusable for me..
Author
Owner

@SHDMBelangerAlexandre commented on GitHub (Jul 3, 2019):

I've got the same as @jbolduan , it launches fine as my user account, but when I right click and run as admin, I get two UAC prompts, dropping back to desktop in between each for a moment or two, and then this error:
image

The only way to fix this i found, is to open your admin session and download the app through the store. But the problem return every time a new version is uploaded. i find it kinda not straight forward.

image

@SHDMBelangerAlexandre commented on GitHub (Jul 3, 2019): > I've got the same as @jbolduan , it launches fine as my user account, but when I right click and run as admin, I get two UAC prompts, dropping back to desktop in between each for a moment or two, and then this error: > ![image](https://user-images.githubusercontent.com/2450407/60229198-72545c80-98d8-11e9-806e-27e72b247510.png) The only way to fix this i found, is to open your admin session and download the app through the store. But the problem return every time a new version is uploaded. i find it kinda not straight forward. ![image](https://user-images.githubusercontent.com/52332100/60605341-57c22d80-9d87-11e9-826e-0c00a54ea69b.png)
Author
Owner

@rtruss commented on GitHub (Aug 7, 2019):

I am running WIN 10 1903 (6.3.18362) and terminal preview installed via the store, this is still an issue. I log on with my low rights user and right click to run elevated.

wintermadinerror

If I try to access the folder, after entering my admin creds I get:
windowsappserror

I really am interested in getting this tool to work, having it all in one is perfect, if I can use it as an admin logged on as my low rights user, like I can with cmd and powershell.exe now.

@rtruss commented on GitHub (Aug 7, 2019): I am running WIN 10 1903 (6.3.18362) and terminal preview installed via the store, this is still an issue. I log on with my low rights user and right click to run elevated. ![wintermadinerror](https://user-images.githubusercontent.com/39066353/62644910-dbd07d80-b910-11e9-8a7e-4ac1e92a49db.png) If I try to access the folder, after entering my admin creds I get: ![windowsappserror](https://user-images.githubusercontent.com/39066353/62645080-218d4600-b911-11e9-89b3-6c7bd5194854.png) I really am interested in getting this tool to work, having it all in one is perfect, if I can use it as an admin logged on as my low rights user, like I can with cmd and powershell.exe now.
Author
Owner

@amoerie commented on GitHub (Aug 7, 2019):

I'm still completely unable to use the Windows Terminal due to this issue, even in regular user mode.

@amoerie commented on GitHub (Aug 7, 2019): I'm still completely unable to use the Windows Terminal due to this issue, even in regular user mode.
Author
Owner

@wushuzh commented on GitHub (Oct 21, 2019):

I guess this is related to Windows upgrade and the permission with folder C:\Program Files\WindowsApp\

In order to install microsoft terminal, I have to manually download the windows upgrader to get the version 1903 as ms-terminal required. I saw there is a windows and windows.old on C disks after upgrading. So I guess some internal setting for my useraccount is done. Maybe some internal ID is re-generated during windows upgrading, so someting needs to be done with the folder WindowsApp permission correspondingly ?

But without an official procedure from microsoft, I don't want to do experiments with folder like Program Files. It's too risky.

@wushuzh commented on GitHub (Oct 21, 2019): I guess this is related to Windows upgrade and the permission with folder `C:\Program Files\WindowsApp\` In order to install microsoft terminal, I have to manually download the windows upgrader to get the version 1903 as ms-terminal required. I saw there is a `windows` and `windows.old` on C disks after upgrading. So I guess some internal setting for my useraccount is done. Maybe some internal ID is re-generated during windows upgrading, so someting needs to be done with the folder WindowsApp permission correspondingly ? But without an official procedure from microsoft, I don't want to do experiments with folder like `Program Files`. It's too risky.
Author
Owner

@wushuzh commented on GitHub (Oct 31, 2019):

Yesterday, windows notices me there are two windows updates available.
After installation, I installed ms-terminal with choco. This time, there is no more crash message and terminal started successfully.

@wushuzh commented on GitHub (Oct 31, 2019): Yesterday, windows notices me there are two windows updates available. After installation, I installed ms-terminal with choco. This time, there is no more crash message and terminal started successfully.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2102