wt app execution alias slow to be created in fresh Windows install/profile creation? #15992

Closed
opened 2026-01-31 04:54:17 +00:00 by claunia · 3 comments
Owner

Originally created by @jeremyd2019 on GitHub (Nov 29, 2021).

Windows Terminal version

1.11.2921.0

Windows build number

10.0.22000.318

Other Software

No response

Steps to reproduce

Use an Unattend.xml to set up a fresh Windows install. As part of that, have a synchronousCommand in the oobeSystem stage that sets up a .cmd script that uses wt (among other things), set that up to auto-run, and reboot the system.

Expected Behavior

Windows Terminal would open from the cmd script run after reboot.

Actual Behavior

It opens on a machine that takes a long time to run the oobeSystem synchronousCommands, but on a faster system it does not. I suspect that there's some background process that populates the app execution aliases of preinstalled/provisioned apps. I tried to hurry this along by using the "Preinstall" zip and dism /Online /Add-ProvisionedAppxPackage, which works to install the newer version of Windows Terminal than what shipped in Windows 11, but doesn't seem to help with wt being unavailable on a fast machine.

Is there a command I can run (from CMD) that would "kick" things and make sure the wt alias will be available "now" (or at least immediately post-reboot)?

Originally created by @jeremyd2019 on GitHub (Nov 29, 2021). ### Windows Terminal version 1.11.2921.0 ### Windows build number 10.0.22000.318 ### Other Software _No response_ ### Steps to reproduce Use an Unattend.xml to set up a fresh Windows install. As part of that, have a synchronousCommand in the oobeSystem stage that sets up a .cmd script that uses wt (among other things), set that up to auto-run, and reboot the system. ### Expected Behavior Windows Terminal would open from the cmd script run after reboot. ### Actual Behavior It opens on a machine that takes a long time to run the oobeSystem synchronousCommands, but on a faster system it does not. I suspect that there's some background process that populates the app execution aliases of preinstalled/provisioned apps. I tried to hurry this along by using the "Preinstall" zip and `dism /Online /Add-ProvisionedAppxPackage`, which works to install the newer version of Windows Terminal than what shipped in Windows 11, but doesn't seem to help with wt being unavailable on a fast machine. Is there a command I can run (from CMD) that would "kick" things and make sure the `wt` alias will be available "now" (or at least immediately post-reboot)?
Author
Owner

@zadjii-msft commented on GitHub (Nov 29, 2021):

Honestly, I have no idea, but @dhoehna might (or might be able to point you at the person who does)

@zadjii-msft commented on GitHub (Nov 29, 2021): Honestly, I have no idea, but @dhoehna might (or might be able to point you at the person who does)
Author
Owner

@jeremyd2019 commented on GitHub (Nov 29, 2021):

for now I think I found a "workaround"...

where /q wt
IF ERRORLEVEL 1 (
        REM start multiple CMD windows
) ELSE (
        REM start multiple tabs in wt
)
@jeremyd2019 commented on GitHub (Nov 29, 2021): for now I think I found a "workaround"... ```cmd where /q wt IF ERRORLEVEL 1 ( REM start multiple CMD windows ) ELSE ( REM start multiple tabs in wt ) ```
Author
Owner

@jeremyd2019 commented on GitHub (Dec 22, 2021):

After running into another issue with an app not being available yet, I found the following seems to do the job:

powershell -ExecutionPolicy Bypass -Command "Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register """"$($_.InstallLocation)\AppXManifest.xml""""}"
@jeremyd2019 commented on GitHub (Dec 22, 2021): After running into another issue with an app not being available yet, I found the following seems to do the job: ``` powershell -ExecutionPolicy Bypass -Command "Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register """"$($_.InstallLocation)\AppXManifest.xml""""}" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15992