Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
amoerie opened this issue Jun 24, 2019 · 10 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase

Comments

@amoerie
Copy link

amoerie commented 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!

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 24, 2019
@MajDogbyte
Copy link

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.

@amoerie amoerie changed the title Bug Report - Windows cannot access the specified device, path or file. Bug Report - "Windows cannot access the specified device, path or file" after running as administrator Jun 24, 2019
@amoerie amoerie changed the title Bug Report - "Windows cannot access the specified device, path or file" after running as administrator Bug Report - Immediate crash with message "Windows cannot access the specified device, path or file" after running as administrator Jun 25, 2019
@jbolduan
Copy link

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.

@JakeMoe
Copy link

JakeMoe commented 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

@DHowett-MSFT
Copy link
Contributor

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

@DHowett-MSFT DHowett-MSFT added Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 27, 2019
@amoerie
Copy link
Author

amoerie commented 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..

@SHDMBelangerAlexandre
Copy link

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

This was referenced Jul 29, 2019
@rtruss
Copy link

rtruss commented 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.

@amoerie
Copy link
Author

amoerie commented Aug 7, 2019

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

@wushuzh
Copy link

wushuzh commented 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
Copy link

wushuzh commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

8 participants