Running wt loads a different config than using the "Terminal" Start Menu entry #17473

Closed
opened 2026-01-31 05:43:32 +00:00 by claunia · 33 comments
Owner

Originally created by @LoganDark on GitHub (May 14, 2022).

Windows Terminal version

1.12.10732.0

Windows build number

10.0.19041.0

Other Software

No response

Steps to reproduce

For me, these steps reproduce the issue:

  1. Open the Start Menu and activate the "Terminal" Start Menu entry, which launches Windows Terminal normally.
  2. Open the Run window (Win+R) and run wt, which launches the same Windows Terminal process (confirmed via Task Manager), but one that somehow loads a different config.
  3. Launching wt.exe or WindowsTerminal.exe from Explorer causes the same issue (loads the same config as starting wt via Run).

Expected Behavior

Before reinstalling Windows Terminal in #13074, the Start Menu entry and the wt command were identical and loaded the same config. wt should load the same config that the "Terminal" Start Menu entry does.

Actual Behavior

The two commands now exhibit different behavior for some reason.

Originally created by @LoganDark on GitHub (May 14, 2022). ### Windows Terminal version 1.12.10732.0 ### Windows build number 10.0.19041.0 ### Other Software _No response_ ### Steps to reproduce For me, these steps reproduce the issue: 1. Open the Start Menu and activate the "Terminal" Start Menu entry, which launches Windows Terminal normally. 2. Open the Run window (Win+R) and run `wt`, which launches the same Windows Terminal process (confirmed via Task Manager), but one that somehow loads a different config. 3. Launching `wt.exe` or `WindowsTerminal.exe` from Explorer causes the same issue (loads the same config as starting `wt` via Run). ### Expected Behavior Before reinstalling Windows Terminal in #13074, the Start Menu entry and the `wt` command were identical and loaded the same config. `wt` should load the same config that the "Terminal" Start Menu entry does. ### Actual Behavior The two commands now exhibit different behavior for some reason.
claunia added the Issue-BugResolution-DuplicateCulprit-Centennial labels 2026-01-31 05:43:32 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2022):

Huh, sounds like one of these is running unpackaged for some reason.

  • In each different window, could you click the "Open JSON File" button, and copy the path to that file here?
  • Could you share what where wt outputs, when run from a conhost.exe window/?

That might help diagnose which is which.

@zadjii-msft commented on GitHub (May 16, 2022): Huh, sounds like one of these is running unpackaged for some reason. * In each different window, could you click the "Open JSON File" button, and copy the path to that file here? * Could you share what `where wt` outputs, when run from a `conhost.exe` window/? That might help diagnose which is which.
Author
Owner

@LoganDark commented on GitHub (May 16, 2022):

  • could you click the "Open JSON File" button

Where is this exactly?

Found it. The working one (Terminal start menu item) gives C:\Users\LoganDark\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json whereas the other one (wt) C:\Users\LoganDark\AppData\Local\Microsoft\Windows Terminal\settings.json.

CMD and PowerShell both cannot find wt, but the Run dialog and Start Menu can. Opening file location leads me to the C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_x64__8wekyb3d8bbwe directory.

@LoganDark commented on GitHub (May 16, 2022): > * could you click the "Open JSON File" button ~~Where is this exactly?~~ Found it. The working one (Terminal start menu item) gives `C:\Users\LoganDark\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` whereas the other one (`wt`) `C:\Users\LoganDark\AppData\Local\Microsoft\Windows Terminal\settings.json`. CMD and PowerShell both cannot find `wt`, but the Run dialog and Start Menu can. Opening file location leads me to the `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_x64__8wekyb3d8bbwe` directory.
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2022):

Looks like the start menu is working as the packaged one, but wt (the alias) is operating totally unpackaged. That's super unexpected.

CMD and PowerShell both cannot find wt, but the Run dialog and Start Menu can. Opening file location leads me to the C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_x64__8wekyb3d8bbwe directory.

Hmmmmm. That's not right at all. Could you share what your %PATH% looks like/? I'm wondering if the alias got messed up somehow here.

@zadjii-msft commented on GitHub (May 16, 2022): Looks like the start menu is working as the packaged one, but `wt` (the alias) is operating totally unpackaged. That's super unexpected. > CMD and PowerShell both cannot find `wt`, but the Run dialog and Start Menu can. Opening file location leads me to the `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_x64__8wekyb3d8bbwe` directory. Hmmmmm. That's not right at all. Could you share what your `%PATH%` looks like/? I'm wondering if the alias got messed up somehow here.
Author
Owner

@DHowett commented on GitHub (May 16, 2022):

This is a symptom of #9452, for sure.

Please follow the remediation and reporting steps in /dup #9452!

@DHowett commented on GitHub (May 16, 2022): This is a symptom of #9452, for sure. Please follow the remediation and reporting steps in /dup #9452!
Author
Owner

@ghost commented on GitHub (May 16, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (May 16, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@LoganDark commented on GitHub (May 17, 2022):

This is a symptom of #9452, for sure.

Please follow the remediation and reporting steps in /dup #9452!

I tried this step, and ran it from a Command Prompt as Administrator:

icacls "C:\Program Files\WindowsApps" /reset /t /c /q

Now my Windows Terminal installation is totally bricked. The "Terminal" Start Menu entry no longer launches anything. I think I just totally screwed something up. The wt command still loads the config in AppData.

Could you please tell me specifically what I need to do in order to solve this? Clearly just picking things from a thread isn't working

p.s. Also tried, from here:

takeown /F "C:\Program Files\WindowsApps"
cacls "C:\Program Files\WindowsApps" /S:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe"
cacls "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe" /S:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"

Windows Terminal still no longer starts

@LoganDark commented on GitHub (May 17, 2022): > This is a symptom of #9452, for sure. > > Please follow the remediation and reporting steps in /dup #9452! I tried this step, and ran it from a Command Prompt as Administrator: > ``` > icacls "C:\Program Files\WindowsApps" /reset /t /c /q > ``` Now my Windows Terminal installation is totally bricked. The "Terminal" Start Menu entry no longer launches anything. I think I just totally screwed something up. The `wt` command still loads the config in AppData. Could you please tell me specifically what I need to do in order to solve this? Clearly just picking things from a thread isn't working p.s. Also tried, from [here](https://github.com/microsoft/terminal/issues/12534#issuecomment-1051338640): ``` takeown /F "C:\Program Files\WindowsApps" cacls "C:\Program Files\WindowsApps" /S:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))" takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe" cacls "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe" /S:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))" ``` Windows Terminal still no longer starts
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

App Installer also won't start anymore, I can't install any .msixbundle files >.<

What did I do to my system and how do I fix it??

@LoganDark commented on GitHub (May 18, 2022): App Installer also won't start anymore, I can't install any .msixbundle files >.< What did I do to my system and how do I fix it??
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

Can you share the output of icacls "C:\Program Files\WindowsApps"?

@DHowett commented on GitHub (May 18, 2022): Can you share the output of `icacls "C:\Program Files\WindowsApps"`?
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

Can you share the output of icacls "C:\Program Files\WindowsApps"?

C:\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(F)
                             NT SERVICE\TrustedInstaller:(OI)(CI)(IO)(F)
                             S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(RX)
                             S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(OI)(CI)(IO)(RX)
                             NT AUTHORITY\SYSTEM:(F)
                             NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
                             BUILTIN\Administrators:(CI)(RX)
                             NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(RX)
                             NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(RX)
                             NT AUTHORITY\RESTRICTED:(OI)(CI)(RX)
                             BUILTIN\Users:(Rc,S,RD,REA,X,RA)
                             LOGANDARK-ASUS\LoganDark:(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 files
@LoganDark commented on GitHub (May 18, 2022): > Can you share the output of `icacls "C:\Program Files\WindowsApps"`? ``` C:\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(F) NT SERVICE\TrustedInstaller:(OI)(CI)(IO)(F) S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(RX) S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(OI)(CI)(IO)(RX) NT AUTHORITY\SYSTEM:(F) NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F) BUILTIN\Administrators:(CI)(RX) NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(RX) NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(RX) NT AUTHORITY\RESTRICTED:(OI)(CI)(RX) BUILTIN\Users:(Rc,S,RD,REA,X,RA) LOGANDARK-ASUS\LoganDark:(OI)(CI)(F) Successfully processed 1 files; Failed processing 0 files ```
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

Hm. The only meaningful difference between your ACLs and mine is the presence of your user as an owner.

If you have psexec installed, you can elevate to SYSTEM and reset its ownership to TrustedInstaller.

psexec -s -i icacls "C:\Program Files\WindowsApps" /setowner "NT SERVICE\TrustedInstaller"
@DHowett commented on GitHub (May 18, 2022): Hm. The only meaningful difference between your ACLs and mine is the presence of your user as an owner. If you have `psexec` installed, you can elevate to `SYSTEM` and reset its ownership to TrustedInstaller. ``` psexec -s -i icacls "C:\Program Files\WindowsApps" /setowner "NT SERVICE\TrustedInstaller" ```
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

Hm. The only meaningful difference between your ACLs and mine is the presence of your user as an owner.

If you have psexec installed, you can elevate to SYSTEM and reset its ownership to TrustedInstaller.

psexec -s -i icacls "C:\Program Files\WindowsApps" /setowner "NT SERVICE\TrustedInstaller"

I can't seem to find the right psexec, I can only find some tool for "executing processes remotely". Could you give me a link to the right psexec?

@LoganDark commented on GitHub (May 18, 2022): > Hm. The only meaningful difference between your ACLs and mine is the presence of your user as an owner. > > If you have `psexec` installed, you can elevate to `SYSTEM` and reset its ownership to TrustedInstaller. > > ``` > psexec -s -i icacls "C:\Program Files\WindowsApps" /setowner "NT SERVICE\TrustedInstaller" > ``` I can't seem to find the right psexec, I can only find some tool for "executing processes remotely". Could you give me a link to the right psexec?
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

That'll be this one: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

@DHowett commented on GitHub (May 18, 2022): That'll be this one: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

That'll be this one: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

Oh wow, that looks to be the same one I found.

Anyway, using that didn't fix it. :< opening an msixbundle file still causes this error, showing App Installer can't start:

image

@LoganDark commented on GitHub (May 18, 2022): > That'll be this one: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec Oh wow, that looks to be the same one I found. Anyway, using that didn't fix it. :< opening an msixbundle file still causes this error, showing App Installer can't start: ![image](https://user-images.githubusercontent.com/4723091/169141788-4b9d6191-c984-4e84-bb05-117388c4f603.png)
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

In that case, I do not know how to help you. Check whether appxsvc is running?

@DHowett commented on GitHub (May 18, 2022): In that case, I do not know how to help you. Check whether `appxsvc` is running?
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

Wait a sec, that's your downloads folder.

If doing the ACL change fixed your other application problems, can you launch Settings, Apps/Features, Terminal, More, and click Repair?

@DHowett commented on GitHub (May 18, 2022): Wait a sec, that's your `downloads` folder. If doing the ACL change fixed your other application problems, can you launch Settings, Apps/Features, Terminal, More, and click Repair?
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

In that case, I do not know how to help you. Check whether appxsvc is running?

...it was not (but restarting it doesn't fix the error).

@LoganDark commented on GitHub (May 18, 2022): > In that case, I do not know how to help you. Check whether `appxsvc` is running? ...it was not (but restarting it doesn't fix the error).
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

Wait a sec, that's your downloads folder.

If doing the ACL change fixed your other application problems, can you launch Settings, Apps/Features, Terminal, More, and click Repair?

Nope, I uninstalled Windows Terminal to try to reinstall it again, but App Installer won't work so I can't.

@LoganDark commented on GitHub (May 18, 2022): > Wait a sec, that's your `downloads` folder. > > If doing the ACL change fixed your other application problems, can you launch Settings, Apps/Features, Terminal, More, and click Repair? Nope, I uninstalled Windows Terminal to try to reinstall it again, but App Installer won't work so I can't.
Author
Owner

@DHowett commented on GitHub (May 18, 2022):

From Powershell, add-appxpackage whatever/path/to/terminal.msixbundle

@DHowett commented on GitHub (May 18, 2022): From Powershell, `add-appxpackage whatever/path/to/terminal.msixbundle`
Author
Owner

@LoganDark commented on GitHub (May 18, 2022):

Reinstalling Windows Terminal and repairing it did nothing - it showed up in the Start Menu again but it still won't run.

@LoganDark commented on GitHub (May 18, 2022): Reinstalling Windows Terminal and repairing it did nothing - it showed up in the Start Menu again but it still won't run.
Author
Owner

@LoganDark commented on GitHub (May 19, 2022):

Trying to start "Alarms & Clock" causes the window to open for a split-second before it crashes:

Event 1000, Application Error
Faulting application name: Time.exe, version: 10.1906.1908.6002, time stamp: 0x5d4a1cdd
Faulting module name: KERNELBASE.dll, version: 10.0.19041.906, time stamp: 0x2f2f77bf
Exception code: 0xc000027b
Fault offset: 0x000000000010b2dc
Faulting process id: 0x3e44
Faulting application start time: 0x01d86b40f1013895
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe\Time.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: fc558be0-558d-43fd-9961-977c34e4e144
Faulting package full name: Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

Event 1001, Windows Error Reporting
Fault bucket , type 0
Event Name: MoAppCrash
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 10.1906.1908.6002
P4: 5d4a1cdd
P5: combase.dll
P6: 10.0.19041.928
P7: c94441ae
P8: 802b000a
P9: 0000000000086256
P10: 

Attached files:

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_Microsoft.Window_4be7b2a04b2ed7537c780cb85705f7cff2336f5_61de52af_d3c77327-26e7-4e33-b99e-25f490c558cc

Analysis symbol: 
Rechecking for solution: 0
Report Id: fc558be0-558d-43fd-9961-977c34e4e144
Report Status: 100
Hashed bucket: 
Cab Guid: 0

C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_Microsoft.Window_4be7b2a04b2ed7537c780cb85705f7cff2336f5_61de52af_d3c77327-26e7-4e33-b99e-25f490c558cc: Report.wer

sfc /scannow said that there were successful repairs but it didn't fix my issue. It also made a log file that I will not attach here due to its sensitive nature but I can provide it over private channels.

@LoganDark commented on GitHub (May 19, 2022): Trying to start "Alarms & Clock" causes the window to open for a split-second before it crashes: ``` Event 1000, Application Error Faulting application name: Time.exe, version: 10.1906.1908.6002, time stamp: 0x5d4a1cdd Faulting module name: KERNELBASE.dll, version: 10.0.19041.906, time stamp: 0x2f2f77bf Exception code: 0xc000027b Fault offset: 0x000000000010b2dc Faulting process id: 0x3e44 Faulting application start time: 0x01d86b40f1013895 Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe\Time.exe Faulting module path: C:\Windows\System32\KERNELBASE.dll Report Id: fc558be0-558d-43fd-9961-977c34e4e144 Faulting package full name: Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App Event 1001, Windows Error Reporting Fault bucket , type 0 Event Name: MoAppCrash Response: Not available Cab Id: 0 Problem signature: P1: Microsoft.WindowsAlarms_10.1906.2182.0_x64__8wekyb3d8bbwe P2: praid:App P3: 10.1906.1908.6002 P4: 5d4a1cdd P5: combase.dll P6: 10.0.19041.928 P7: c94441ae P8: 802b000a P9: 0000000000086256 P10: Attached files: These files may be available here: \\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_Microsoft.Window_4be7b2a04b2ed7537c780cb85705f7cff2336f5_61de52af_d3c77327-26e7-4e33-b99e-25f490c558cc Analysis symbol: Rechecking for solution: 0 Report Id: fc558be0-558d-43fd-9961-977c34e4e144 Report Status: 100 Hashed bucket: Cab Guid: 0 ``` `C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_Microsoft.Window_4be7b2a04b2ed7537c780cb85705f7cff2336f5_61de52af_d3c77327-26e7-4e33-b99e-25f490c558cc`: [Report.wer](https://github.com/microsoft/terminal/files/8725432/Report.wer.txt) `sfc /scannow` said that there were successful repairs but it didn't fix my issue. It also made a log file that I will not attach here due to its sensitive nature but I can provide it over private channels.
Author
Owner

@DHowett commented on GitHub (May 19, 2022):

Curious... can you file feedback via the feedback hub? Or does that not launch either?

@DHowett commented on GitHub (May 19, 2022): Curious... can you file feedback via the feedback hub? Or does that not launch either?
Author
Owner

@LoganDark commented on GitHub (May 20, 2022):

Curious... can you file feedback via the feedback hub? Or does that not launch either?

Feedback hub shows the loading screen/icon and then crashes

@LoganDark commented on GitHub (May 20, 2022): > Curious... can you file feedback via the feedback hub? Or does that not launch either? Feedback hub shows the loading screen/icon and then crashes
Author
Owner

@LoganDark commented on GitHub (May 20, 2022):

This is worrying me a lot. Am I just on my own now? A command that you (or @zadjii-msft) gave me, completely broke my Windows install?

I really can't reinstall. If there's no way to fix this then it's going to be broken forever and I'm going to be very sad.

@LoganDark commented on GitHub (May 20, 2022): This is worrying me a lot. Am I just on my own now? A command that you (or @zadjii-msft) gave me, completely broke my Windows install? I really can't reinstall. If there's no way to fix this then it's going to be broken forever and I'm going to be very sad.
Author
Owner

@DHowett commented on GitHub (May 20, 2022):

We're looking into the crash report that you shared with us. Sorry that it's been slow going.
Do you have any WER reports with a "Hashed bucket" value? What is your Diagnostic level set to? That might be why we can't find the crashes on our end.

From Powershell, add-appxpackage whatever/path/to/terminal.msixbundle

So when you did this, it didn't report any errors but it also didn't fix anything?

I am trying to set up a virtual machine in the same broken state as your machine. :)

Can you also grab the AppX-related event logs and upload them somewhere or e-mail them to me at the address on my GitHub user profile? You can find them in Event Viewer > Application and Services Logs > Microsoft > Windows > AppXDeplyment and AppXDeployment-Server See Below.

@DHowett commented on GitHub (May 20, 2022): We're looking into the crash report that you shared with us. Sorry that it's been slow going. Do you have any WER reports with a "Hashed bucket" value? What is your Diagnostic level set to? That might be why we can't find the crashes on our end. > From Powershell, `add-appxpackage whatever/path/to/terminal.msixbundle` So when you did this, it didn't report any errors but it also didn't fix anything? I am trying to set up a virtual machine in the same broken state as your machine. :) ~Can you also grab the AppX-related event logs and upload them somewhere or e-mail them to me at the address on my GitHub user profile? You can find them in Event Viewer > Application and Services Logs > Microsoft > Windows > AppXDeplyment and AppXDeployment-Server~ See Below.
Author
Owner

@DHowett commented on GitHub (May 20, 2022):

And furthermore, can you save and run the following powershell script? It will produce a diagnostic archive. Please note that the diagnostic archive will contain some system information; feel free to read over the script before you run it; I'm not trying to take any of your data 😄

https://gist.github.com/DHowett/c7612e720cea10fd34271cdfae4c3006

@DHowett commented on GitHub (May 20, 2022): And furthermore, can you save and run the following powershell script? It will produce a diagnostic archive. _Please note that the diagnostic archive will contain some system information; feel free to read over the script before you run it; I'm not trying to take any of your data :smile:_ https://gist.github.com/DHowett/c7612e720cea10fd34271cdfae4c3006
Author
Owner

@DHowett commented on GitHub (May 20, 2022):

Okay, I think I know what's going on. icacls ... /reset /t /c /q will destroy the permissions to the app catalog for all installed applications, and is 100% wrong in every situation. Recovering from this is not going to be easy. I've spent a couple hours so far trying to reconstruct it...

@DHowett commented on GitHub (May 20, 2022): Okay, I think I know what's going on. `icacls ... /reset /t /c /q` will destroy the permissions to the app catalog for all installed applications, and is 100% wrong in every situation. Recovering from this is not going to be easy. I've spent a couple hours so far trying to reconstruct it...
Author
Owner

@DHowett commented on GitHub (May 21, 2022):

Okay, this is the best solution that i could come up with. What you need to do is an "in-place upgrade" to the same version of Windows as you already have.

Get the Windows 10 Media Creation Tool, create some media, and run setup.exe while you are booted into the current version of Windows. It should offer an install. Make sure Keep files and apps is selected -- this is the setting that keeps all your data, apps and settings.

I spent hours breaking my virtual machine and this was the only thing that restored all of my broken app packages to normality. It didn't lose any of my data -- it is NOT a reinstall from scratch!

@DHowett commented on GitHub (May 21, 2022): Okay, this is the best solution that i could come up with. What you need to do is an "in-place upgrade" to the same version of Windows as you already have. Get the Windows 10 Media Creation Tool, create some media, and run setup.exe while you are booted into the current version of Windows. It should offer an install. Make sure **Keep files and apps** is selected -- this is the setting that keeps all your data, apps and settings. I spent hours breaking my virtual machine and this was the only thing that restored all of my broken app packages to normality. It didn't lose any of my data -- it is NOT a reinstall from scratch!
Author
Owner

@LoganDark commented on GitHub (May 21, 2022):

What you need to do is an "in-place upgrade" to the same version of Windows as you already have.

This worries me, becaaause... I spent a lot of time disabling Windows Update and Windows Defender, and my firewall is configured quite specifically, and stuff like that... Wouldn't an in-place upgrade:

  • Re-enable Windows Update and force install a bunch of stuff, destroying my system
  • Re-enable Windows Defender and delete a bunch of my apps
  • Reset my firewall
  • Clear all my registry hacks
  • Mess with my drivers

and so on?

If it doesn't then I can look into it - I'm just worried because my Windows system is configured beyond what you'd find in the settings menu. For example manually imported WSL distributions and stuff.

@LoganDark commented on GitHub (May 21, 2022): > What you need to do is an "in-place upgrade" to the same version of Windows as you already have. This worries me, becaaause... I spent a lot of time disabling Windows Update and Windows Defender, and my firewall is configured quite specifically, and stuff like that... Wouldn't an in-place upgrade: - Re-enable Windows Update and force install a bunch of stuff, destroying my system - Re-enable Windows Defender and delete a bunch of my apps - Reset my firewall - Clear all my registry hacks - Mess with my drivers and so on? If it doesn't then I can look into it - I'm just worried because my Windows system is configured beyond what you'd find in the settings menu. For example manually imported WSL distributions and stuff.
Author
Owner

@LoganDark commented on GitHub (May 26, 2022):

OK @DHowett, so I took your word for it and did an in-place upgrade. Here's a step-by-step explanation of what I did and how you can reproduce it:

Backup step (optional)

Windows Updates can sometimes destroy your PC or setup in one way or another, so making a backup is definitely a good idea. The only backup that's going to work in this case is a lossless bit-for-bit copy of your entire drive. And the only way you can do that is offline (i.e. without Windows running). So you'll need a Linux live USB to follow along here, I used Alpine.

If you were to just copy the entire drive into a file, you'd get a file the size of your entire drive (in my case, 1TB). This is a waste because it's uncompressed, and it stores even empty (unallocated) disk space. So instead, I'm using compression. In order to make the free space compressible, you will have to zero it out, and the best way to do this is to write zeros into a file until you run out of space, then delete the file, which will leave the zeros behind.

  • From Windows:

    1. Use Task Manager to locate any programs that are using the disk, and close as many as you can. Many programs will completely wipe your settings if you run out of disk space, even if the space comes back later, so make sure those are all closed.

    2. Clear as much space as you can. You can use a helper program like WizTree for this, which is basically a much faster version of WinDirStat. I deleted my Steam games library which took up around 500GB of space. It can be redownloaded later.

    3. Run this command in WSL1, preferably in /mnt/c or a subdirectory thereof:

      cat /dev/zero > zeros.bin
      

      DO NOT RUN IT IN WSL2 or else you will NOT be able to get your free space back. WSL2 uses a virtual machine hard disk, which does not shrink (without a lot of manual kerfuffery).

      You can use Windows Explorer to monitor your free space. The command will automatically exit when you are completely out.

    4. You can then delete the file:

      rm zeros.bin
      

      This will take a minute.

    5. Immediately reboot into your Linux live USB.

  • From your Linux live USB:

    1. Install pv (progress bar) and zstd (compression utility), which will be needed for the backup. (pv isn't strictly needed, but a progress bar is very nice)

    2. Use blkid to locate your boot drive (/dev/nvme0n1 for me) and external drive partition (/dev/sdb1 for me).

    3. Mount your external drive where the backup will be stored:

      mkdir /media/wd
      mount /dev/sdb1 /media/wd
      
    4. Then, run this command to backup your entire boot drive, bit-for-bit, replacing /dev/nvme0n1 with the drive being backed up, and /media/wd/... with a file on the drive where the backup will be stored:

      pv /dev/nvme0n1 | zstd -T12 -5 > /media/wd/ASUS.nvme0n1.5.25.2022.zst
      

      (Try setting -T to the amount of threads your processor has. -5 is the compression level, in my testing 5 is still fast enough to essentially saturate most connections.)

    5. The output file was about 113GB, down from around 350GB of used space on my drive, which has a total capacity of 1TB (!).

    6. The command to restore again would be pv /media/wd/ASUS.nvme0n1.5.25.2022.zst | unzstd > /dev/nvme0n1, but I didn't have to use that.

Back to Windows, Linux isn't needed anymore.

In-place upgrade step

If you don't want to upgrade to a new edition of Windows, you can't use any Microsoft tools. But you can use MediaCreationTool.bat (not endorsed by Microsoft) to create an install media for any version of Windows you want.

  1. Download the MediaCreationTool.bat
  2. Double-click it; it will open a window allowing you to select a Windows version
  3. For me, I was running 2004, which is 20H1 in the tool, so I selected 20H1
  4. When it asks you between a bunch of "auto" options, click "Select", which will simply open the media creation wizard
  5. Use the media creation wizard as normal, i.e. install to a spare USB drive. Make sure to not let it install extra updates for you.
  6. Make sure you have WUB on your machine...
  7. Disconnect your internet and then run setup.exe from the USB drive you just created.
  8. Let it go for about an hour. Wait till it's done.
  9. Windows Update is back, so before reconnecting your internet, run WUB to kill Windows Update again.
  10. Reconnect your internet, and you're back in business.

If anything bad happens, you can restore your backup and try again.

Results

Alarms & Clock works now. So my UWP runtime is not completely F'ed anymore.

Windows Terminal... does not work.

Installing it manually with Add-AppxPackage creates a nonworking installation again. Except this time running wt directly no longer works (permissions error).

Scenario 1

  • wsappx running
  • Firewall & Windows Defender fully off
  • Double-clicking latest Win10 msixbundle from GitHub Releases
  • Same error message

Scenario 2

  • wsappx running
  • Firewall & Windows Defender fully off
  • Running Terminal from Start Menu
  • Nothing happens

Scenario 3

  • wsappx running

  • Firewall & Windows Defender fully off

  • Clicking one of the terminal profiles here:

    image

  • image

Scenario 4

  • wsappx running
  • Firewall & Windows Defender fully off
  • Windows Terminal installed using Add-AppxPackage
  • No difference (all above scenarios still apply)

Waiting to hear from you, thanks.

@LoganDark commented on GitHub (May 26, 2022): OK @DHowett, so I took your word for it and did an in-place upgrade. Here's a step-by-step explanation of what I did and how you can reproduce it: ## Backup step (optional) Windows Updates can sometimes destroy your PC or setup in one way or another, so making a backup is definitely a good idea. The only backup that's going to work in this case is a lossless bit-for-bit copy of your entire drive. And the only way you can do that is offline (i.e. without Windows running). So you'll need a Linux live USB to follow along here, I used Alpine. If you were to just copy the entire drive into a file, you'd get a file the size of your entire drive (in my case, 1TB). This is a waste because it's uncompressed, and it stores even empty (unallocated) disk space. So instead, I'm using compression. In order to make the free space compressible, you will have to zero it out, and the best way to do this is to write zeros into a file until you run out of space, then delete the file, which will leave the zeros behind. - From Windows: 1. Use Task Manager to locate any programs that are using the disk, and close as many as you can. Many programs will completely wipe your settings if you run out of disk space, even if the space comes back later, so make sure those are all closed. 2. Clear as much space as you can. You can use a helper program like WizTree for this, which is basically a much faster version of WinDirStat. I deleted my Steam games library which took up around 500GB of space. It can be redownloaded later. 3. Run this command in WSL1, preferably in `/mnt/c` or a subdirectory thereof: ``` cat /dev/zero > zeros.bin ``` ***DO NOT RUN IT IN WSL2*** or else you will NOT be able to get your free space back. WSL2 uses a virtual machine hard disk, which does not shrink (without a lot of manual kerfuffery). You can use Windows Explorer to monitor your free space. The command will automatically exit when you are completely out. 4. You can then delete the file: ``` rm zeros.bin ``` This will take a minute. 5. Immediately reboot into your Linux live USB. - From your Linux live USB: 1. Install `pv` (progress bar) and `zstd` (compression utility), which will be needed for the backup. (`pv` isn't strictly needed, but a progress bar is very nice) 2. Use `blkid` to locate your boot drive (`/dev/nvme0n1` for me) and external drive partition (`/dev/sdb1` for me). 3. Mount your external drive where the backup will be stored: ``` mkdir /media/wd mount /dev/sdb1 /media/wd ``` 4. Then, run this command to backup your entire boot drive, bit-for-bit, replacing `/dev/nvme0n1` with the drive being backed up, and `/media/wd/...` with a file on the drive where the backup will be stored: ```text pv /dev/nvme0n1 | zstd -T12 -5 > /media/wd/ASUS.nvme0n1.5.25.2022.zst ``` (Try setting `-T` to the amount of threads your processor has. `-5` is the compression level, in my testing 5 is still fast enough to essentially saturate most connections.) 9. The output file was about 113GB, down from around 350GB of used space on my drive, which has a total capacity of 1TB (!). 10. The command to restore again would be `pv /media/wd/ASUS.nvme0n1.5.25.2022.zst | unzstd > /dev/nvme0n1`, but I didn't have to use that. Back to Windows, Linux isn't needed anymore. ## In-place upgrade step If you don't want to upgrade to a new edition of Windows, you can't use any Microsoft tools. But you can use [MediaCreationTool.bat](https://github.com/AveYo/MediaCreationTool.bat/blob/master/MediaCreationTool.bat) (not endorsed by Microsoft) to create an install media for any version of Windows you want. 1. Download the [MediaCreationTool.bat](https://github.com/AveYo/MediaCreationTool.bat/blob/master/MediaCreationTool.bat) 2. Double-click it; it will open a window allowing you to select a Windows version 3. For me, I was running 2004, which is 20H1 in the tool, so I selected 20H1 4. When it asks you between a bunch of "auto" options, click "Select", which will simply open the media creation wizard 5. Use the media creation wizard as normal, i.e. install to a spare USB drive. Make sure to **not** let it install extra updates for you. 6. Make sure you have WUB on your machine... 7. Disconnect your internet and then run `setup.exe` from the USB drive you just created. 8. Let it go for about an hour. Wait till it's done. 9. Windows Update is back, so **before reconnecting your internet, run WUB to kill Windows Update again**. 10. Reconnect your internet, and you're back in business. If anything bad happens, you can restore your backup and try again. ## Results Alarms & Clock works now. So my UWP runtime is not completely F'ed anymore. Windows Terminal... does not work. Installing it manually with `Add-AppxPackage` creates a nonworking installation again. Except this time running `wt` directly no longer works (permissions error). ### Scenario 1 - wsappx running - Firewall & Windows Defender fully off - Double-clicking latest Win10 msixbundle from GitHub Releases - Same error message ### Scenario 2 - wsappx running - Firewall & Windows Defender fully off - Running `Terminal` from Start Menu - Nothing happens ### Scenario 3 - wsappx running - Firewall & Windows Defender fully off - Clicking one of the terminal profiles here: ![image](https://user-images.githubusercontent.com/4723091/170482692-324b2e7a-b074-4ad9-af03-5023a26f3f23.png) - ![image](https://user-images.githubusercontent.com/4723091/170482726-f5d7a219-2c46-4012-9470-1e0e902ab02b.png) ### Scenario 4 - wsappx running - Firewall & Windows Defender fully off - Windows Terminal installed using `Add-AppxPackage` - No difference (all above scenarios still apply) --- Waiting to hear from you, thanks.
Author
Owner

@LoganDark commented on GitHub (May 27, 2022):

Running the app as administrator... surprisingly works! Both the Start Menu entry and wt work if run as Administrator. I discovered this completely by accident. Running it as my standard user account still doesn't work.

The config loaded is C:\Users\LoganDark\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json in both cases. This means the original issue is actually fixed. Woohoo! Should I open a new one?

@LoganDark commented on GitHub (May 27, 2022): Running the app as administrator... surprisingly works! Both the Start Menu entry and `wt` work if run as Administrator. I discovered this completely by accident. Running it as my standard user account still doesn't work. The config loaded is `C:\Users\LoganDark\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` in *both cases*. This means the original issue is actually fixed. Woohoo! Should I open a new one?
Author
Owner

@bobmagicii commented on GitHub (Feb 23, 2023):

this (as in the original problem this thread was created for) just started happening to me.

typing "terminal" at my start menu launches

image

using

C:\Users\bob\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json

typing wt at win+r (does not work from cmd.exe) launches

image

using

C:\Users\bob\AppData\Local\Microsoft\Windows Terminal\settings.json

in both cases right clicking openconsole.exe > open file location opens the same folder.

C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe

@bobmagicii commented on GitHub (Feb 23, 2023): this (as in the original problem this thread was created for) just started happening to me. typing "terminal" at my start menu launches ![image](https://user-images.githubusercontent.com/881944/221028917-46c1f1ed-677d-444a-8fe8-fc5423f94b8c.png) using `C:\Users\bob\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` typing `wt` at win+r (does not work from cmd.exe) launches ![image](https://user-images.githubusercontent.com/881944/221029053-89e62d47-660a-4c0c-889d-739c91239afc.png) using `C:\Users\bob\AppData\Local\Microsoft\Windows Terminal\settings.json` in both cases right clicking openconsole.exe > open file location opens the same folder. `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe`
Author
Owner

@DHowett commented on GitHub (Feb 23, 2023):

Have you, or a person you know, messed with the permissions on C:\Program Files\WindowsApps?

@DHowett commented on GitHub (Feb 23, 2023): Have you, or a person you know, messed with the permissions on `C:\Program Files\WindowsApps`?
Author
Owner

@bobmagicii commented on GitHub (Feb 23, 2023):

Have you, or a person you know, messed with the permissions on C:\Program Files\WindowsApps?

nope - fairly new laptop and thats the first i even heard of that directory existing tbh. its the only windows app store app i've ever installed. with my fingers crossed that one day it can just be a normal program with an normal installer.

@bobmagicii commented on GitHub (Feb 23, 2023): > Have you, or a person you know, messed with the permissions on `C:\Program Files\WindowsApps`? nope - fairly new laptop and thats the first i even heard of that directory existing tbh. its the only windows app store app i've ever installed. with my fingers crossed that one day it can just be a normal program with an normal installer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17473