cmd script termintes early when wt is set as default console #17579

Closed
opened 2026-01-31 05:46:30 +00:00 by claunia · 2 comments
Owner

Originally created by @Secant1006 on GitHub (May 26, 2022).

Windows Terminal version

1.12.10983.0

Windows build number

10.0.22621.1

Other Software

No response

Steps to reproduce

  1. set WT as default terminal
  2. write a cmd script
  3. execute the cmd script directly from file explorer
    eg.
    ren 1 2
    ren 2 3
    ren 3 4
    ...
    ren 99 100

Expected Behavior

cmd script should be executed correctly. In the example, the file "1" should be renamed to "100".

Actual Behavior

cmd script terminated early randomly with error 0x00000001. The file "1" in the example was renamed to other numbers like 85, 86, 87, 92, etc. The cmd script was never executed correctly.

Originally created by @Secant1006 on GitHub (May 26, 2022). ### Windows Terminal version 1.12.10983.0 ### Windows build number 10.0.22621.1 ### Other Software _No response_ ### Steps to reproduce 1. set WT as default terminal 2. write a cmd script 3. execute the cmd script directly from file explorer eg. ren 1 2 ren 2 3 ren 3 4 ... ren 99 100 ### Expected Behavior cmd script should be executed correctly. In the example, the file "1" should be renamed to "100". ### Actual Behavior cmd script terminated early randomly with error 0x00000001. The file "1" in the example was renamed to other numbers like 85, 86, 87, 92, etc. The cmd script was never executed correctly.
Author
Owner

@zadjii-msft commented on GitHub (Aug 1, 2022):

Alright so I can't for the life of me repro this, at least not on 1.16.1962.0 (which I'm actually pretty sure is a 1.15 build) and 10.0.25167.1000. Every time I run this script, it exits cleanly with the file being renamed to 100.txt at the end. Are you sure there's nothing else in the script? Perhaps this was fixed in the course of the last three releases/?

script I'm using
ren 0.txt 1.txt
ren 1.txt 2.txt
ren 2.txt 3.txt
ren 3.txt 4.txt
ren 4.txt 5.txt
ren 5.txt 6.txt
ren 6.txt 7.txt
ren 7.txt 8.txt
ren 8.txt 9.txt
ren 9.txt 10.txt
ren 10.txt 11.txt
ren 11.txt 12.txt
ren 12.txt 13.txt
ren 13.txt 14.txt
ren 14.txt 15.txt
ren 15.txt 16.txt
ren 16.txt 17.txt
ren 17.txt 18.txt
ren 18.txt 19.txt
ren 19.txt 20.txt
ren 20.txt 21.txt
ren 21.txt 22.txt
ren 22.txt 23.txt
ren 23.txt 24.txt
ren 24.txt 25.txt
ren 25.txt 26.txt
ren 26.txt 27.txt
ren 27.txt 28.txt
ren 28.txt 29.txt
ren 29.txt 30.txt
ren 30.txt 31.txt
ren 31.txt 32.txt
ren 32.txt 33.txt
ren 33.txt 34.txt
ren 34.txt 35.txt
ren 35.txt 36.txt
ren 36.txt 37.txt
ren 37.txt 38.txt
ren 38.txt 39.txt
ren 39.txt 40.txt
ren 40.txt 41.txt
ren 41.txt 42.txt
ren 42.txt 43.txt
ren 43.txt 44.txt
ren 44.txt 45.txt
ren 45.txt 46.txt
ren 46.txt 47.txt
ren 47.txt 48.txt
ren 48.txt 49.txt
ren 49.txt 50.txt
ren 50.txt 51.txt
ren 51.txt 52.txt
ren 52.txt 53.txt
ren 53.txt 54.txt
ren 54.txt 55.txt
ren 55.txt 56.txt
ren 56.txt 57.txt
ren 57.txt 58.txt
ren 58.txt 59.txt
ren 59.txt 60.txt
ren 60.txt 61.txt
ren 61.txt 62.txt
ren 62.txt 63.txt
ren 63.txt 64.txt
ren 64.txt 65.txt
ren 65.txt 66.txt
ren 66.txt 67.txt
ren 67.txt 68.txt
ren 68.txt 69.txt
ren 69.txt 70.txt
ren 70.txt 71.txt
ren 71.txt 72.txt
ren 72.txt 73.txt
ren 73.txt 74.txt
ren 74.txt 75.txt
ren 75.txt 76.txt
ren 76.txt 77.txt
ren 77.txt 78.txt
ren 78.txt 79.txt
ren 79.txt 80.txt
ren 80.txt 81.txt
ren 81.txt 82.txt
ren 82.txt 83.txt
ren 83.txt 84.txt
ren 84.txt 85.txt
ren 85.txt 86.txt
ren 86.txt 87.txt
ren 87.txt 88.txt
ren 88.txt 89.txt
ren 89.txt 90.txt
ren 90.txt 91.txt
ren 91.txt 92.txt
ren 92.txt 93.txt
ren 93.txt 94.txt
ren 94.txt 95.txt
ren 95.txt 96.txt
ren 96.txt 97.txt
ren 97.txt 98.txt
ren 98.txt 99.txt
ren 99.txt 100.txt

@zadjii-msft commented on GitHub (Aug 1, 2022): Alright so I can't for the life of me repro this, at least not on `1.16.1962.0` (which I'm actually pretty sure is a 1.15 build) and `10.0.25167.1000`. Every time I run this script, it exits cleanly with the file being renamed to 100.txt at the end. Are you sure there's nothing else in the script? Perhaps this was fixed in the course of the last three releases/? <details> <summary>script I'm using</summary> ```bat ren 0.txt 1.txt ren 1.txt 2.txt ren 2.txt 3.txt ren 3.txt 4.txt ren 4.txt 5.txt ren 5.txt 6.txt ren 6.txt 7.txt ren 7.txt 8.txt ren 8.txt 9.txt ren 9.txt 10.txt ren 10.txt 11.txt ren 11.txt 12.txt ren 12.txt 13.txt ren 13.txt 14.txt ren 14.txt 15.txt ren 15.txt 16.txt ren 16.txt 17.txt ren 17.txt 18.txt ren 18.txt 19.txt ren 19.txt 20.txt ren 20.txt 21.txt ren 21.txt 22.txt ren 22.txt 23.txt ren 23.txt 24.txt ren 24.txt 25.txt ren 25.txt 26.txt ren 26.txt 27.txt ren 27.txt 28.txt ren 28.txt 29.txt ren 29.txt 30.txt ren 30.txt 31.txt ren 31.txt 32.txt ren 32.txt 33.txt ren 33.txt 34.txt ren 34.txt 35.txt ren 35.txt 36.txt ren 36.txt 37.txt ren 37.txt 38.txt ren 38.txt 39.txt ren 39.txt 40.txt ren 40.txt 41.txt ren 41.txt 42.txt ren 42.txt 43.txt ren 43.txt 44.txt ren 44.txt 45.txt ren 45.txt 46.txt ren 46.txt 47.txt ren 47.txt 48.txt ren 48.txt 49.txt ren 49.txt 50.txt ren 50.txt 51.txt ren 51.txt 52.txt ren 52.txt 53.txt ren 53.txt 54.txt ren 54.txt 55.txt ren 55.txt 56.txt ren 56.txt 57.txt ren 57.txt 58.txt ren 58.txt 59.txt ren 59.txt 60.txt ren 60.txt 61.txt ren 61.txt 62.txt ren 62.txt 63.txt ren 63.txt 64.txt ren 64.txt 65.txt ren 65.txt 66.txt ren 66.txt 67.txt ren 67.txt 68.txt ren 68.txt 69.txt ren 69.txt 70.txt ren 70.txt 71.txt ren 71.txt 72.txt ren 72.txt 73.txt ren 73.txt 74.txt ren 74.txt 75.txt ren 75.txt 76.txt ren 76.txt 77.txt ren 77.txt 78.txt ren 78.txt 79.txt ren 79.txt 80.txt ren 80.txt 81.txt ren 81.txt 82.txt ren 82.txt 83.txt ren 83.txt 84.txt ren 84.txt 85.txt ren 85.txt 86.txt ren 86.txt 87.txt ren 87.txt 88.txt ren 88.txt 89.txt ren 89.txt 90.txt ren 90.txt 91.txt ren 91.txt 92.txt ren 92.txt 93.txt ren 93.txt 94.txt ren 94.txt 95.txt ren 95.txt 96.txt ren 96.txt 97.txt ren 97.txt 98.txt ren 98.txt 99.txt ren 99.txt 100.txt ``` </details>
Author
Owner

@Secant1006 commented on GitHub (Aug 2, 2022):

Alright so I can't for the life of me repro this, at least not on 1.16.1962.0 (which I'm actually pretty sure is a 1.15 build) and 10.0.25167.1000. Every time I run this script, it exits cleanly with the file being renamed to 100.txt at the end. Are you sure there's nothing else in the script? Perhaps this was fixed in the course of the last three releases/?

I revisited the problem and found that 1.14.1963.0 has already fixed the bug. Thanks anyway!

@Secant1006 commented on GitHub (Aug 2, 2022): > Alright so I can't for the life of me repro this, at least not on `1.16.1962.0` (which I'm actually pretty sure is a 1.15 build) and `10.0.25167.1000`. Every time I run this script, it exits cleanly with the file being renamed to 100.txt at the end. Are you sure there's nothing else in the script? Perhaps this was fixed in the course of the last three releases/? I revisited the problem and found that `1.14.1963.0` has already fixed the bug. Thanks anyway!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17579