WindowsTerminal fails to launch elevate=true profiles on new install; elevate-shim does not set dllpath #19018

Open
opened 2026-01-31 06:31:20 +00:00 by claunia · 0 comments
Owner

Originally created by @jboelter on GitHub (Dec 7, 2022).

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22621.819

Other Software

N/A - brand new system setup

Steps to reproduce

This should repro on a brand new Windows 11 installation as long as you do not have vcruntime140.dll in your default system %PATH%.

  • Install new Windows 11 System
  • Install Windows Terminal from the App Store
  • Launch Windows Terminal
  • Create a new profile by duplicating the Command Prompt profile and setting the elevate = true flag
  • Launch the new Command Prompt (elevated) profile (or whatever you named it)

Will provide additional details in the comments. I've got procmon traces, dump snapshots and a method to observe this w/o the failure. Issue seems to be related to ShellExecuteExW in elevate-shim not setting the DllPath in the elevated process.

Expected Behavior

New Windows Terminal window launches w/ elevated cmd.exe

Actual Behavior

WindowsTerminal.exe fails to launch w/ "not found" errors for msvcp140.dll, vcruntime140.dll, vcruntime140_1.dll

image image image
Originally created by @jboelter on GitHub (Dec 7, 2022). ### Windows Terminal version 1.15.2875.0 ### Windows build number 10.0.22621.819 ### Other Software N/A - brand new system setup ### Steps to reproduce This should repro on a brand new Windows 11 installation as long as you do not have vcruntime140.dll in your default system %PATH%. - Install new Windows 11 System - Install Windows Terminal from the App Store - Launch Windows Terminal - Create a new profile by duplicating the `Command Prompt` profile and setting the `elevate = true` flag - Launch the new `Command Prompt (elevated)` profile (or whatever you named it) Will provide additional details in the comments. I've got procmon traces, dump snapshots and a method to observe this w/o the failure. Issue seems to be related to ShellExecuteExW in elevate-shim not setting the DllPath in the elevated process. ### Expected Behavior New Windows Terminal window launches w/ elevated cmd.exe ### Actual Behavior WindowsTerminal.exe fails to launch w/ "not found" errors for msvcp140.dll, vcruntime140.dll, vcruntime140_1.dll <img width="309" alt="image" src="https://user-images.githubusercontent.com/3619564/206064820-04d66ed7-118e-407e-a7b0-c55438ecb452.png"> <img width="302" alt="image" src="https://user-images.githubusercontent.com/3619564/206064842-3552f372-22b4-4a4f-8eac-8c0d6e872fc2.png"> <img width="309" alt="image" src="https://user-images.githubusercontent.com/3619564/206065201-5d78d77d-986a-4b9c-a5f9-5487aab023c8.png">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19018