Terminal failed to start if "C:\Program.exe" exists #5699

Open
opened 2026-01-31 00:19:27 +00:00 by claunia · 0 comments
Owner

Originally created by @everything411 on GitHub (Dec 26, 2019).

Originally assigned to: @DHowett-MSFT on GitHub.

Environment

Windows build number: Microsoft Windows NT 10.0.18363.0

Windows Terminal version: Version: 0.7.3451.0

A program named "C:\Program.exe" by myself

Here is the source code of C:\Program.exe

#include <windows.h>
int WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd)
{
    MessageBox(NULL, "C:\\Program.exe Executed!", "Bug", MB_OK);
    return 0;
}

my profile

        {
            "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
            "hidden": false,
            "name": "Debian",
            "fontFace": "等距更纱黑体 SC",
            "source": "Windows.Terminal.Wsl"
        },

Steps to reproduce

rename the exe to "Program.exe" and place it at C:\ then run Windows Terminal

Expected behavior

Windows Terminal starts normally

Actual behavior

C:\Program.exe is executed. And after it exits, Windows Terminal exit with an error

捕获 捕获 捕获3
Originally created by @everything411 on GitHub (Dec 26, 2019). Originally assigned to: @DHowett-MSFT on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows NT 10.0.18363.0 Windows Terminal version: Version: 0.7.3451.0 A program named "C:\Program.exe" by myself ``` Here is the source code of C:\Program.exe ```c #include <windows.h> int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { MessageBox(NULL, "C:\\Program.exe Executed!", "Bug", MB_OK); return 0; } ``` my profile ```json { "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}", "hidden": false, "name": "Debian", "fontFace": "等距更纱黑体 SC", "source": "Windows.Terminal.Wsl" }, ``` # Steps to reproduce rename the exe to "Program.exe" and place it at C:\ then run Windows Terminal # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> Windows Terminal starts normally # Actual behavior <!-- What's actually happening? --> C:\Program.exe is executed. And after it exits, Windows Terminal exit with an error <img width="101" alt="捕获" src="https://user-images.githubusercontent.com/32010059/71454626-8e27b500-27cc-11ea-9b9e-f2e0505b9ba9.PNG"> <img width="744" alt="捕获" src="https://user-images.githubusercontent.com/32010059/71454670-ccbd6f80-27cc-11ea-8796-ab898147467a.PNG"> <img width="333" alt="捕获3" src="https://user-images.githubusercontent.com/32010059/71454675-cdee9c80-27cc-11ea-9bb3-f1db0344592e.PNG">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5699