Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles.json "startingDirectory" : "%SYSTEMDRIVE%" points to system32 #1555

happybear88 opened this issue Jun 24, 2019 · 1 comment


None yet
2 participants
Copy link

commented Jun 24, 2019


Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): latest from the store

Steps to reproduce

  1. Modify any profile in profiles.json such that
    "startingDirectory" : "%SYSTEMDRIVE%",
  2. Launch the profile

Expected behavior

Starting dir is the system drive, e.g. C

Actual behavior

Starting dir is %SYSTEMDRIVE%\system32


%systemroot% works fine, didn't check other env vars


This comment has been minimized.

Copy link

commented Jun 24, 2019

This is just a quirk of how paths on Windows work! Here's something neat. %SYSTEMDRIVE% expands to C:, but...

C: is a "relative" path, it's just relative to "which folder is currently active on the C drive"... which is a behavior that dates back to DOS 2.0.

As an example, if I set my "active directory" on my E drive to E:\src, I can do this:

dir E:openconsole

and I'll get the response:

 Volume in drive E is Thorium
 Volume Serial Number is 1AF0-C31B

 Directory of e:\src\openconsole  <-- here!

Anyway, the way around this is to use %SYSTEMDRIVE%\ (which you'll need to properly escape for JSON) which makes it an absolute path anchored at your system drive.

We, of course, cannot change any of this. It's old Windows and DOS arcana that people love to rely on. It lets you do things like COPY A:bigfile C:bigfile2 without specifying directories, which can get long and annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.