variables unset at WT start #21167

Closed
opened 2026-01-31 07:35:08 +00:00 by claunia · 2 comments
Owner

Originally created by @Butterfly-Dragon on GitHub (Feb 1, 2024).

Windows Terminal version

1.20.10293

Windows build number

10.0.19045.3996

Other Software

i started a diagnostic start with msconfig to make sure it was not other applications interfering

Steps to reproduce

run this batch file:

@ECHO OFF
SET
PAUSE

in my case i just wrote: "C:\Users[REDACTED FOR PRIVACY]\AppData\Local\Microsoft\WindowsApps\wt.exe" nt --title "TEST" "D:\set.bat"

Expected Behavior

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users[REDACTED FOR PRIVACY]\AppData\Roaming
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132479619682755241
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=[REDACTED FOR PRIVACY]
ComSpec=C:\WINDOWS\system32\cmd.exe
DEVMGR_SHOW_NONPRESENT_DEVICES=1
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=[REDACTED FOR PRIVACY]
JAVA_HOME=C:\Program Files\Eclipse Adoptium\jre-21.0.1.12-hotspot
LOCALAPPDATA=C:\Users[REDACTED FOR PRIVACY]\AppData\Local
LOGONSERVER=[REDACTED FOR PRIVACY]
NUMBER_OF_PROCESSORS=16
OneDrive=D:\OneDrive
OneDriveConsumer=D:\OneDrive
OS=Windows_NT
Path=[REDACTED FOR PRIVACY]
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=9e0d
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
prompt=[REDACTED FOR PRIVACY]@[REDACTED FOR PRIVACY] $D $T $$V$$M$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users[REDACTED FOR PRIVACY]\AppData\Local\Temp
TMP=C:\Users[REDACTED FOR PRIVACY]\AppData\Local\Temp
USERDOMAIN=AREA51M
USERDOMAIN_ROAMINGPROFILE=AREA51M
USERNAME=[REDACTED FOR PRIVACY]
USERPROFILE=C:\Users[REDACTED FOR PRIVACY]
windir=C:\WINDOWS
WSLENV=WT_SESSION:WT_PROFILE_ID:
WT_PROFILE_ID=[REDACTED FOR PRIVACY]
WT_SESSION=[REDACTED FOR PRIVACY]
ZES_ENABLE_SYSMAN=1
Press any key to continue...

Actual Behavior

ALLUSERSPROFILE=C:\ProgramData
COMSPEC=C:\WINDOWS\system32\cmd.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC
PROMPT=$P$G
WSLENV=WT_SESSION:WT_PROFILE_ID:
WT_PROFILE_ID=[REDACTED FOR PRIVACY]
WT_SESSION=[REDACTED FOR PRIVACY]

[the process closes super fast saying something like "PAUSE is not a recognized command" despite the terminal being set to never close automatically]

Originally created by @Butterfly-Dragon on GitHub (Feb 1, 2024). ### Windows Terminal version 1.20.10293 ### Windows build number 10.0.19045.3996 ### Other Software i started a diagnostic start with msconfig to make sure it was not other applications interfering ### Steps to reproduce run this batch file: ``` @ECHO OFF SET PAUSE ``` in my case i just wrote: "C:\Users\[REDACTED FOR PRIVACY]\AppData\Local\Microsoft\WindowsApps\wt.exe" nt --title "TEST" "D:\set.bat" ### Expected Behavior ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\[REDACTED FOR PRIVACY]\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=132479619682755241 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=[REDACTED FOR PRIVACY] ComSpec=C:\WINDOWS\system32\cmd.exe DEVMGR_SHOW_NONPRESENT_DEVICES=1 DriverData=C:\Windows\System32\Drivers\DriverData HOMEDRIVE=C: HOMEPATH=[REDACTED FOR PRIVACY] JAVA_HOME=C:\Program Files\Eclipse Adoptium\jre-21.0.1.12-hotspot\ LOCALAPPDATA=C:\Users\[REDACTED FOR PRIVACY]\AppData\Local LOGONSERVER=[REDACTED FOR PRIVACY] NUMBER_OF_PROCESSORS=16 OneDrive=D:\OneDrive OneDriveConsumer=D:\OneDrive OS=Windows_NT Path=[REDACTED FOR PRIVACY] PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9e0d ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files prompt=[REDACTED FOR PRIVACY]@[REDACTED FOR PRIVACY] $D $T $_$V$_$M$P$G PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\[REDACTED FOR PRIVACY]\AppData\Local\Temp TMP=C:\Users\[REDACTED FOR PRIVACY]\AppData\Local\Temp USERDOMAIN=AREA51M USERDOMAIN_ROAMINGPROFILE=AREA51M USERNAME=[REDACTED FOR PRIVACY] USERPROFILE=C:\Users\[REDACTED FOR PRIVACY] windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID=[REDACTED FOR PRIVACY] WT_SESSION=[REDACTED FOR PRIVACY] ZES_ENABLE_SYSMAN=1 Press any key to continue... ### Actual Behavior ALLUSERSPROFILE=C:\ProgramData COMSPEC=C:\WINDOWS\system32\cmd.exe PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC PROMPT=$P$G WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID=[REDACTED FOR PRIVACY] WT_SESSION=[REDACTED FOR PRIVACY] [the process closes super fast saying something like "PAUSE is not a recognized command" despite the terminal being set to never close automatically]
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:35:08 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 1, 2024):

Yea this is /dup #16623.

v1.20.10303.0 is out now with the fix. Sorry about that!

@zadjii-msft commented on GitHub (Feb 1, 2024): Yea this is /dup #16623. [v1.20.10303.0](https://github.com/microsoft/terminal/releases/tag/v1.20.10303.0) is out now with the fix. Sorry about that!
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Feb 1, 2024):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Feb 1, 2024): 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! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21167