How to query the value of %SystemDrive% in an empty environment?

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Aug 6 15:41:00 GMT 2019


On Aug  6 17:20, Michael Haubenwallner wrote:
> Hi,
> 
> using 'env -i' to create an empty environment, the SYSTEMROOT and WINDIR
> environment variables are preserved (or recreated):
>  $ /usr/bin/env -i /usr/bin/env
>  SYSTEMROOT=C:\Windows
>  WINDIR=C:\Windows
> 
> And with cygpath, there is the -A, -D, -H, -O, -P, -S, -W and even -F flags
> to query the values for various directories.
> 
> Now what I've failed to find is how to query the value for the "SystemDrive"
> environment variable.

Just strip it off SYSTEMROOT?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190806/cbbc55b7/attachment.sig>


More information about the Cygwin mailing list